Mostly for women; men/boys were usually the exception (think 1940's/50's/60's/70's public-school/YMCA swimming pools).
It was around the late 70's/early 80's that this practice was halted for male swimmers. There are many fingers pointing at various reasons (some more legit/believable than others), but the point is women have almost always been expected to cover up, whereas this norm was (was) much more relaxed for men/boys.
Mostly for women; men/boys were usually the exception (think 1940's/50's/60's/70's public-school/YMC