Have you ever enjoyed yourself so much in a pool that you've been too lazy to get out and pee in a bathroom?
So you just peed in the pool - yeah, I'm talking to you.
Besides being downright unhygienic (because other people would essentially be swimming in your pee, ew), there's an actual scientific reason as to why you shouldn't ever pee in a pool, at least a public pool (you can be as gross as you want at home).
In simple terms, pools are the perfect environments for microorganisms, such as E.coli and salmonella, to grow.
Chlorine, among other chemicals and disinfectants, is added to swimming pools to kill the microorganisms that can thrive in such environments.