it is basically due to inertia;
In order to avoid falling.. try to run with velocity of train when coming down from a moving train/bus.. so that the body and leg both have same velocity and you won't fall.
PS: Avoid jumping out of train/bus..It can be injurious to health and wealth.
As long as the bus does not accelerate underneath you while you are in the air, there is no net force acting on you and thus you will remain at your current velocity, which is the same as that of the bus. This is called the principle of inertia AKA Netwon's first law but it can also be seen from the more quantifiable second law,
F=maF=ma
So if force is zero for your inertial reference frame (the moving bus) then your acceleration is zero and you remain at the same speed.
If the bus didn't have any walls to shield you from the wind however (think of something that resembles a moving platform) then it is possible that impact from air molecules relative to which you are moving will transfer enough of their momentum to knock you backwards — in other words, the wind would blow you back. This doesn't happen in the case of a regular bus because it is enclosed and all the air in it has been accelerated to the same speed along with you