Rusted Screws on Hayward Super Pump

Hi recently our Hayward Super Pump had a bad leak that we discovered. The water leaked out presumably by the seal and rusted the motor cap screws. Just wondering how this may have occured and if we were right to assume it is from the seal. Side note the damage shown on the seal assembly happened after we discovered the leak.

The motor cap screws usually rust because of a bad shaft seal or water build-up under the pump.