if you want to know go find out yourself you crazy nosy krack heads
Rust is iron oxide. So when iron oxidizes you get rust. So iron and steel (iron and carbon) are prone to this happening while metal like aluminum well not rust.
The number of chemical reactions that are possible to cause corrosion are beyond the scope of an internet questions. I do, however, know what is causing the metal to rust. Your "pool chemicals" are likely some acids and bases for pH up or down, a total alkalinity adjuster, and some shock chemical...
Stainless steel is coated in a Zinc Chromium alloy which oxidises and creates a protective layer covering the steel and preventing it from rusting. stainless steel doesn't corrode because it's coated in chromium nickel.
things rust by oxygen touching the surface of the metal and the metal having a chemical reaction to it.