Swedish pools at the time required you to shower, naked [1], before entering the pool, and to use soap while showering, with special attention to the hair, armpits, crotch, and feet. This helps get rid of the dirt and urea (which when combined with chlorine makes the 'swimming pool smell'), keeping the pool clean and with little odor.
It is difficult to wash underwear with the same thoroughness. I have not seen people laundering their underwear before swimming.
[1] Our local pool changed to allow showering in one's bathing trunks. I personally don't like the rule, as I think people will skimp on washing their crotch before entering the pool.