It is very very common for expectations around clothing to be different for men and women and both are regularly told what they should wear.
most schools have a uniform. Construction jobs have safety equipment including hard hats. Care staff usually wear a jumper or t shirt with the company name on it.
in the nhs people in operating theatres wear scrubs, nurses and healthcare professionals wear uniforms.
when I was a teacher we had a dress code and most companies have a dress code although they’re largely more relaxed than they used to be.
people are told what to wear all the bloody time.
in social situations - at weddings and funerals there are expectations around clothing - how many aibu/style and beauty threads are there along the lines of it this suitable?
many restaurants on holiday destinations (or in the uk) expect shoes and a top to be worn - I’ve seen the sign “no beach wear” in many restaurants in both the uk and abroad.
genuinely, the idea that you should be able to wear what you want when you want only works if you engage very little in society. Sure, if you are self employed computer programmer living on an island where you cut your own wood and never meet anyone, fine.
but most of us live in a world where we need to work to earn some money and so yes, other people’s opinions on what we should wear matter.
so the people who are saying it’s wrong to be told what to wear - well maybe it is but it happens all the time and the only way out of it is to withdraw from society altogether.