I once interviewed at a medium sized, name brand Silicon Valley darling everyone on HN has heard of, where an interviewer outright asked me if I was married and if I had kids! Like, holy shit, just read your interview training manual! The very first sentence is probably "Do not ask any questions where the answer would even imply information about things that would get us in trouble discrimination-wise." Yet this person overtly asked! Here I was in the stairwell walking down to the second floor and she hits me up with one of the few totally forbidden questions! I thought about saying "What would HR think of that question?" but the asker was the HR manager! Totally bonkers.
An interesting strategy?
This case is strictly worse because the questions are explicitly being asked to evaluate eligibility for hiring.
Are you a virgin?
I could definitely see arguments for asking these sorts of questions in how they could be job related but not worth the legal risk
I haven't had (nor ever likely will) have the luxury of working somewhere where potential/smarts is too relevant past a relatively low threshold