A fly in mid-air in the front side of a moving vehicle should come back to the rear side. But the fly remains in the same location in the air. How?

All objects on earth, including men, insects, buses, trees, buildings, lakes and atmospheric air are struck to earth’s gravity because the latter operates a force towards the centre of the earth from the centres of gravity of each of the objects in the earth’s gravitational field. Since the gravitational attraction among the objects is negligible in comparison to the gravitational pull the earth exerts on each object in its field, the mutually relative positions of these objects remain unchanged. Thus, the earth provides an inertial frame of reference for the objects it holds in its field. The mutual and relative positions of the objects would change only when one or more of these objects make a resultant displacement overcoming the gravitational pull.

Image source : spirit-animals.com
According to Newton’s First Law of Motion, an object in stationary state or one in a state of uniform velocity in an inertial frame of reference will continue to be in that state unless and until a force acts on it. This retention of state in the absence of a net force is called the inertia of the object, originating by its own mass. Thus, all the parts and material objects physically linked to the vehicle’s framework retain their positional coordinates as long as they do not make any relative displacement with respect to the vehicle’s internal inertial frame of reference. When a vehicle is moving with certain speed, the objects, materially connected to the vehicle, also move along with the vehicle due to inertia as the whole vehicle serves as the inertial frame of reference. These objects include not only the passengers, seats, luggage, etc., but also the air inside it.

An insect is no exception for this inertial influence. It needs air to fly and the air it flies in is also moving with the same speed as the bus. If the fly does not make any forward or backward movement it remains in the same location because the fly is materially (and inertially) connected to the vehicle through the air. Imagine stationary vehicle with its air removed by evacuation before a (super) fly is suspended in the bus with no forward or backward movement. If the vehicle, then suddenly, commences a forward movement, the fly would really hit the back of the vehicle because now there is no air that goes along with the vehicle holding the fly, materially and inertially stuck to the vehicle’s frame of reference.