There are financial and legal reasons why a company might not hire you if you were in this situation. There is more hassle for the company, and additional expense. They may or may not think any particular candidate is worth the additional hassle and expense. So it is a perfectly legitimate question to ask ( again, assuming it is asked in an appropritate manner ).
This is complicated a little for transferable sponsored visas like the H1B. Someone already on an H1B might reply ‘yes’ to the work authorization question, but with the caveat that you would need to take on their sponsorship. Technically, their answer should be ‘no’. They aren’t authorized to work for anyone other than their sponsoring employer, in a specific location, with a specific job title. As I say, the point is that if the answer is ‘yes’, not ‘yes but’, or ‘no’, then you’re not permitted to discriminate. Asking someone with work authorization questions about their visa type should be as much of an interview no-no as asking a candidate if she’s pregnant.
Only exception is certain jobs can place citizenship requirements because of security clearance requirements.
I am not sure but in the UK employing some one without the legal right to work has no defence even if they had perfectly forged passports/documents.
I had to (as some one with all 4 grandparents being natural born uk citizens) have had to take my birth certificate to register at a local high street agency.
It's most likely (almost certainly) a legal obligation. Each time I had to furnish a SS card as well. A non-citizen SS card has a disclaimer on it saying it's not valid for work authorization alone.
You probably have been asked for documentation that gives you permission to work. The Department of Labor has a list somewhere (can't find it right now) of what constitutes a work permit, and the employer has to accept anything that conforms.
My wife ran into a particularly obstinate HR drone once who wouldn't accept what she had. She asked company counsel if her documentation was in order and received a phonecall from HR to please come in and sign paperwork before the day was over. Yes, federal law has teeth.
https://www.uscis.gov/i-9-central/acceptable-documents/list-...