Sounds like your interviewer just a a grudge against you or something.
I know that my generation (and the one before) have caused many issues, but I'm not your typical "OK boomer."
But it is not enforced. Tech companies don't bother to hide it at all. They run job ads that all but say "Bros only."
When money is being made, the authorities tend to look the other way. That has been going on in the finance industry for decades (and don't get me started on crypto).
There good cause for "the law" in daily reality (as opposed to "The Law" as an abstract good) not to be held in any esteem by ordinary folk.