The trouble is, it rarely seems to be floor-to-ceiling cubicle walls, especially in public facilities. That's more expensive to put up and has some logistical issues, e.g. in sports centres where the ceiling is very high or open drainage culverts (is that the word?) run along the floor.
A man was prosecuted in my area recently for installing hidden cameras in his female employees' and female customers' bathroom. Other incidents of him stalking and covertly filming young girls changing (in cubicles) at the local swimming pool were also taken into account. It's amazing how commonplace these stories are. They certainly don't make headlines, sometimes even in local papers.
When I was younger, I would've thought it was terribly prudish and uptight to insist on adequately separated spaces. Let's all celebrate our bodies and be cool! Now I realise that male voyeurism, and inappropriate or exhibitionist behaviour, is not a little one-off issue or something trivial because, hey, nobody really got hurt. I can't imagine DH or any of my male friends/family ever getting a kick out of this behaviour, but I've been on the receiving end of it sufficient times to understand that it's not the rarity some people seem to believe.
The option of adequately separated spaces can never eradicate the problem (as the toilet camera examples show), but it can limit opportunities and gives everyone the sense that we're taking the problem of women's privacy and dignity and protection seriously instead of laughing it off as just a few pervy blokes and peeping toms.