I guess the YMCA swim instructors were as perverted predatory child molesters as the catholic priests.
There have been a number of posts explaining the rationales behind mandatory nude swimming for boys at the YMCA up the mid 1960s. There are social, technical, financial and military aspects to the reasons, all of which were mixed up together.
First off, when the YMCA was founded mid-19th century, the idea was to reach out to urban, impoverished families. Not being financially all that solvent, it was decided not to insist on the use of swimming suits, as these would have to be purchased and place a burden on the family, keeping boys away from the YMCA. Besides, nude swimming at local lakes/ponds/rivers was common practice anyway, certainly for rural kids.
Technical: only a minor reason but still understandable. Swimming suits were initially made of wool. Wool clogged up the drains and filters in swimming pool, necessitating repairs which cost money. Hence, no swimming suits.
Military: certainly after 1918 and the draft during WWI, it was thought that military service would, from then on, be a universal given. All (normal, healthy) youngster would sooner or later end up in the military. Being in the military meant suffering a lack of almost all forms of privacy. Soldiers would be naked together, defecate together and all of those otherwise private activities. Better to prepare youngsters for lack of privacy as early as possible was the thinking. There wouldn't be any when they were inevitably called up for military service.
Were there YMCA instructors who had pleasure observing naked youngsters? Undoubtedly. But probably no more than was the case in the general population. People often forget in the hysteria of our oh so modern times, that the greatest risk by far of sexual molestation comes from family members and close friends and acquaintances.
In any case, nude swimming at the YMCA was not instituted on a whim or for a hidden agenda. The founders and administrators came from a time when moral views were sharply debated, just as much, if not more than now. They certainly did not institute nude swimming for the convenience of molesters.