It is not arguable that the pilots in the cabin direct the airplane in the sky, but they never determine the height at which the plane must fly above the sea level, the route which the plane flies and the track or the passage for the plane to travel. The air dispatchers perform all these functions and here are factors that determine the height at which the plane flies into the sky:
The type of airplane.
The distance to a desired destination.
The type of the engine in the plane.
The strength of the prevailing wind.
The weight of the plane.
The aviation law.
The flight dispatchers.
The flight progress upward into the sky must be done with safety in view.