I maintain that simply being at a border crossing should not be grounds for detaining, but I do recognise that while a competent border crossing would make it impossible for someone to simply walk into the sterile "crossing zone" (and in airports such zones are usually pretty solid), this is not exactly a department known for competency.
Edit: Now that I consider it, it would seem really incompetent to just not notice which direction someone came from. This would allow people to cross the border all day with impunity. Pure speculation, but I bet they knew exactly which way he came from; they just felt like hassling some muslim looking guy without ID because they could (although I recognise that in the US, carrying a driving license everywhere seems to be a weird cultural phenomenon).
“Muslim looking guy” (what does that even mean?)
You don't have to agree with it to know what a "muslim looking guy" means. It means "someone whose looks Arabic or Persian, possibly with a beard". That's what it means. It's wrong, and it's prejudical, and in a strictly literal sense the words are inherently nonsensical, but that's what it means. I think you knew that already and for some passive-aggressive reason you're pretending you didn't.
Perhaps less "weird cultural phenomenon" and more "it's about the same size as a credit card", plus "it's probably the only broadly accepted government-issued ID you've got, so there's a variety of things things you might need it for, some of which you might not expect when you leave the house", resulting in "just leave it in your wallet or your handbag or wherever you carry such things".
If you're already generally leaving it with all the other miscellany you carry by default, it'd be more effort and more risk to take it out whenever you don't think you'd need it than to just leave it in your wallet/bag. If you're going to buy something, generally you'd have your wallet.
How do you handle such things, then? Honestly curious.
My wallet is quite small, I will say; I just have a rubber band around a couple of credit cards and potentially some folded banknotes, so I don't carry general "miscellany". I may be an outlier; if I'm going out to the shops or the gym or some such, I'll also leave my phone at home.
This did not take place at an Airport, but rather, a Canadian/US border patrol station where according to someone else in this thread, a bus stop for border crossing exists.
It seems entirely reasonable to me that those agents are more vigilant against "I totally forgot my ID at home".