Earlier quoted context omitted.
Any competent HR department would have a fit if they knew these kinds of questions were being asked. It's way too easy to wander into illegal discrimination when you're making hiring decisions based on people's backgrounds like this.
You'd think this was true, but I've seen some crazy shit in interviews, even at companies that were big enough and had a robust enough legal team, where you'd think they'd have their shit together. 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 trai…
This case is strictly worse because the questions are explicitly being asked to evaluate eligibility for hiring.