Bare and Rusted Steel Beams

So, let’s use a little common sense.
Why are steel bridges, ships and other structures painted?
Regards,
Peter