The protective coating of zinc with galvanized iron works in a different way than paint.
Zinc is a more active metal than iron. This means that whenever the zinc contacts the iron, the zinc is always becomes the anode. So the zinc dissolves not the iron.
Even if the zinc coating is abraded through to the iron, the zinc is still the anode and dissolves being "sacrificed" in the protection of the iron.
The thin tin coating on the iron can is unreactive to foods in the can, while the more active iron would dissolve in acidic foods. Now, what would happen if the less active tin plate is scratched through to the iron'? The large area of the tin encourages corrosion of the iron and before long the can leaks.
Hence, galvanization of iron articles preferred to tinning