> In the US, those are protected categories about which a prospective employer may not inquire
No, they aren't. First, it's questionable whether sexual orientation is a federally protected axis of discrimination, and, second, it's illegal to discriminate on protected axes (except where they are bona fide qualifications, or some other exception to the general rule exists), not to enquire on them (HR will generally avoid enquiry not necessary for a clearly legal purpose to mitigate the risk that that will be viewed as evidence of discrimination, not because it is illegal in and of itself.)
No, they aren't. First, it's questionable whether sexual orientation is a federally protected axis of discrimination, and, second, it's illegal to discriminate on protected axes (except where they are bona fide qualifications, or some other exception to the general rule exists), not to enquire on them (HR will generally avoid enquiry not necessary for a clearly legal purpose to mitigate the risk that that will be viewed as evidence of discrimination, not because it is illegal in and of itself.)