But casual sex works well for many women too ... Yet it is considered 'harmful'
that's what most of us now disagree with, that it's generally 'harmful' and therefore worthy of a blanket 'thou shalt not'.
In the past, before contraception, antibiotics, condoms etc, a broad general rule against casual sex (codified and enforced by the concept of 'morality') guarded against some harms, but also policed women's fertility and men's paternity.
Modern science has disrupted that, so we are freer to consider each case in its context for whether it's in any way 'harmful'. Obvious a lot of this is opaque to outsiders.