The point people are making is that this varies by location and age.
people have said that in Europe it’s fine. So in Europe it’s ok.
some people have said that in Germany bikini bottoms are a costume for both children and adults and so it’s culturally ok for adult women to go topless there.
other people have said that in the uk their swimming pool have made rules that bits and girls both need to cover their chests.
so
This is cultural issue and it varies between cultures
within cultures there are different ages at which girls are usually expected to wear tops or a one piece
and in any case on private property or in a council owned swimming pool they can set what rules they like and if you don’t want to stick to them you don’t go.
so many French pools have rules about men’s swimming attire (and enforce them). English pools also have rules about swimming attire and enforce them.
i’m not going to go to France and try to change a whole culture around pool swimming attire - I’m just going to tell my son or husband and they can choose whether to go or not,
in the same way in the uk it is generally expected at an indoor pool in a child who is out of nappies that if female they wear a one piece or top.
the lady who worked there was pointing this out to the op (in a much more polite way than the French can be about male attire!), and yes it’s different for different sexes, and yes it’s different in different countries and yes it was different in different places (beach, splash pad, etc) and yes it was different in the past but those are the rules now and in that place.