What causes rust inside car interior?

Water is leaking inside the car, it could be from a clogged drain for the sunroof, clogged a/c evaporator case drain, faulty heater core, faulty door seal or even an improperly installed replacement windshield.