It's also usually located behind the rear axle. Something which is shaped in a way as to lodge itself against the road and the bottom of the vehicle to it is driven upwards is likely going to have done this before it gets to the rear axle.
Most of the vehicles on the road are front wheel drive and thus don't have a rear axle. However, the gas tank is usually mounted slightly higher than the floorboard in front of it, so that offers some protection as well.
The other thing to keep in mind is that the fuel tank is usually located in the rear of the vehicle while potential ignition sources (engine) is located in the front. This can reduce the risk of a fire as well. However, the exhaust system runs to the back of the car.