It is a reasonable question, one that finds its answer in the concept of the planetary boundary layer.
The rotating Earth, through its various irregularities on the surface and in topography, drags the atmosphere along. This vertical momentum transfer becomes weaker and weaker as one goes up in the vertical coordinate, until at a height of about ~1km the atmosphere does not 'feel' the ground anymore and one reaches the free-streaming atmosphere.
The exact thickness of the boundary layer will be modified when mountains are present, which can easily be higher than 1km. Furthermore, turbulent motions and convection tend to mix layers of different momentum and thusly act to drag the atmosphere along. A vigorously convecting atmosphere will have a thicker boundary layer. While this involves turbulent momentum transfer, which is in general an unsolved problem in physics, progress has been made in understanding the height of this layer through semi-analytic means, such as the law of the wall.
In the lower free-streaming atmosphere, the motion is governed by geostrophic balance modulo mass, momentum and heat injected by the Hadley-circulations.
Higher up, where the free-streaming atmosphere is stably stratified, the atmosphere behaves like the gas mass of any gaseous body with no bottom, such as gas giants.