I believe you can get water in the fuel tank from condensation inside the tank due to changes in temperature particularly if the fuel level is low and the car parked up for long periods of time.

This may be able to cause rust inside the tank if it's not well rust proofed.

Also I would have thought that if the fuel nozzle has any bits of grit or dirt on the outside this could easily end up in your tank.

And as Harry says some petrol stations may have a small leak in their tank, which is expensive to fix so they'd rather not fix them if they don't have to.

If the leak is near the neck of the tank they might not be losing fuel but might get water and dirt seeping in.