Transit areas are still subject to local laws. If I ran an online shop selling, say, firearms to Britons or Nazi flags to Germans I would not expect to pass through their airports unmolested.
If you're not going to USA/any other country and you don't have a VISA for that country But the airplane is forced to land that makes an involuntary illegal alien.
The flight was forced to land, he knew he could not visit the USA