Yup. That's it. And the people running entry and customs at airports around the world are not necessarily the most capable and accomplished among us. I have lots of stories.
For example, entering into Mexico (Cancun), there are probably twenty passport check booths. The line for passport checks easily had 500 people in it. Every single agent left their station, with only one left to process 500 people. That remained so for about an hour. As could be expected, tempers were flaring and interactions with this one person, in some cases, where, well, less than ideal. No supervisor in sight. About an hour later five agents showed-up. It was horrible, the agents had an attitude and travelers were tired and angry. I've been going to Mexico for a decade, this was the only time I've seen something like this. Someone for whom that trip was their only exposure would likely come out of it with a very different perspective.
Here's another one. I won't name the country because this was a thing at a moment in history for them and no-longer the case for probably the last twenty years. When travelling to this particular country is was an unspoken rule that you had to put money into your passport (typically $100 per traveler) in order to gain entry without being hassled. If you did not, the consequences were in a range between having to pay serious "taxes" on your stuff to having some of your things confiscated (typically your electronics).
As I said in another comment, this isn't a black and white issue, it's shades of grade.
For first world entry they just depend on the fact the 1st world country is harsher on security than them so they don't bother. Might be different if you enter from Mexico's south land border.
People get worked-up about interactions at airports without fully understanding their context and realities. Just chill, don't argue, don't be an idiot and enjoy the trip.
I travel internationally all the time. I work with companies in China, Singapore, Japan, Australia, Europe and Latin America. Meaning, I know lots of people who travel internationally with great frequency. I have never heard from anyone having any such problems. Ever. Not during this administration nor others. Stop listening to idiots pushing false narratives. It's fear mongering. Not real.
Oddly enough, I have been asked more questions when travelling to Canada (Montreal) over the years than almost anywhere else. Nothing serious, thigs like "Why are you travelling to Canada?", "Where are you staying?", "How long?", "Where do you work?", "What's your website and business email?", "Who are you meeting with?", "What is their contact information?", etc. And, BTW, all of this at the standard entry passport check booth, not a side room.
Of course, it feels intrusive when it happens. I look at it as security theater. Just chill and go through the process. Being stupid about this can ruin your trip in any country. Unless you are a diplomat, you are not important enough to bother with. Picking a fight with entry officials in any country will result in bad things happening to you. Don't be that person.
To the point about security theater: Last year we travelled to Mexico on vacation. When we got to the hotel we bought a few supplies. A couple of the items were sealed the type of plastic packaging that you cannot possibly open with your bare hands or teeth. I said "I'll go to the front desk and see if they can let me use a pair of scissors". Without missing a beat, my daughter pulls out a pair of standard size Fiskars scissors from her luggage. Jaw drop moment. She went through security, full scan, and a pair of scissors made it onto the plane. So, yeah, security theater at its best. BTW, the scissors did not make it through security at the airport in Mexico when returning.
BTW, I have also hired Canadian engineers and we've never had problems. You just have to go through the process, hire and attorney and do it right. Which, BTW, is true anywhere in the world.