In the 60s, women who wanted to be men----literally----was on the verge of medical possibility, but it was culturally unthinkable. There was no Chaz Bono. Chastity was a newborn.
The writers put Janice Lester's ambitions at such an intense level, she was willing to give up her identity and live as a man.
All due to Starfleet's un=PC ''No female Captains'' rule. In many ways we are more open minded than TREK'S future gender attitudes.
Spock and Kirk comment that her hatred of her own womanhood misses the point, doesn't it?