What happens if you're a plumber - do they get you to fix a dripping tap?
I'm sorry, but after the stress of traveling though an airport, I'm not coding anything until after I get home (or to a hotel) and rest.
You are always allowed to get home if you prefer that as long as it's outside U.S.
Sure, defend the ridiculous.
Note the bonus assumption that legal immigrants don't matter and the US isn't "really" their home.
I don't agree with the decision but I would rather code 10 minutes than to buy a ticket and fly back 9 hours to get home. For me the second option would be rudiculous.
I'll only code their stupid test if given a good hourly rate and a laptop with a fast internet connection. I won't hesitate to politely say I don't think this is going to work out and leave the interview.
And then they can deport you for doing paid work on a tourist visa!