On most bikes theres an overfill vent tube from the filler neck passing through the tank and into a tube draining to the street, if that becomes blocked it creates a vacuum in the tank which basically shuts the fuel off, I push a length of copper wire through mine at each service to keep that clear.

This is a kawasaki by the way but any bike with a similar system will be the same.