I had to wear them in the late 70's along with skirts - smart office wear - Blue chip, back office. I was 20 - I didn't question it. I complied.
1984 - sales job, printing company. I was hauled into Director's office one day for wearing trousers with flats rather than a skirt and heels. From then on I complied under protest. I liked the job.
Late 1980's - 1990's training delivery - blue chip corporate clients. It was strongly suggested that heels were part of the dress code - and I was reprimanded for being too casual although heels were not specifically mentioned. I complied when it was a key event otherwise I didn't but I was always smart. Always wore a jacket, earrings, make-up, smart shoes rather than sandals, tights if wearing a skirt.
In all cases we are talking about heeled court shoe/ pumps
Since then I have not worn heels at work. I dress down a bit at work or wear trouser suits with flats or low-heeled boots.
I have knee ligament problems and lower back problems and lumps on my heels, (Haglund's deformity) which make shoe choice difficult. I will not be forced to wear heels again - I simply can't walk in them any more.
Dress codes reasonable and I support them. Dress codes should be:
--> identifiable, (uniforms),
--> a "role" rather than a person so "lawyer" not Goth - (although of course you can be both but I want to deal with the lawyer),
--> professional
_--> practical, safe, suitable, comfortable
--> allow others to feel at ease -(I don't want my male doctor examining me in his cycling shorts or my son's headteacher discussing his SEN in her short skirt and killer heels or my mother's care worker trying to deal with her dementia in full burka.
IN most cases you accept the job and all the requirements that go with it. That includes shift work, having to drive, working with people you would prefer not to spend time with and being in an office/factory/van when you would rather sit in the sun. Adhering to a dress code is part of that.
High heels are not necessary though. Smart flats or very low heels are fine