Interesting documentary and does raise quite a few interesting points, indeed why if it is just all boys (or girls) is there any need to wear trunks?
From what I've heard it was only the boys who swam nude. The idea in those days was that boys don't have modesty, while girls need their privacy, or at least the "good girls" should want their privacy.
I'd imagine that it started in the days when physical education (P.E.) was only for boys in school. Girls took Home Economics (home ec - where they learned about cooking and sewing) while the boys took PE. Educators rightly noticed that it made more sense to swim nude. Less dirt for the filters and less worry about the school having to provide swimsuits & have them cleaned. Plus swimming naked just feels better so the boys mostly didn't mind.
When feminism started making in roads girls wanted equal access to the gym facilities at school. That started with sex-segregated PE classes. Boys would play basketball, baseball & lift weights while girls would do gymnastics & stretching exercises. For swimming they divided the pool time between the boy & girl classes. Girls wore suits because "proper lady's protect their modesty" while boys didn't because "that's how we've always done it before & boys don't care." I'd imagine that also had to do with the fact that female coaches were few and far between in those days. So there was little worry about boys having a female coach while girls stood a good chance of having a male coach.
Around the 1970s you had a "perfect storm" of events to kill the nude swimming at school. Title IX and other feminist movements killed gender segregated PE classes since girls often got the short end of the stick in such situations. The gay rights movement made boys aware that gay people weren't just some rare thing that happens in San Francisco; but the boy standing next to you in gym could be gay. Awareness of sexual harassment by teachers made them afraid that they might end up in jail or court if they supervised naked boys.