This is directly related to Newton's first law of motion. It states that a body at rest tends to stay at rest and a body in motion tends to stay in motion. When you are riding on a bus, both you and the bus are in motion while the bus is being driven forward. But when the driver applies the brakes, the bus slows down to an eventual stop. But your body is not slowed down by the brakes so it will have a tendency to stay in forward motion. If you are standing up, your body will lurch forward while the bus slows down underneath you. If you are not holding on carefully, you will likely fall down.