AFAIK this is more about making sure people have what they paid for rather than checking for shoplifting.
This is the optimist's view; in fact, I've never considered this in the 10+ years I've shopped at Sam's Club/Costco.
They just briefly skim over the receipt -- until they hit a more expensive purchase, so your view would make sense (the opposite is not possible for shoplifting).
In my experience they do check to see if you have items that are likely to be forgotten because they have to be brought from the wire cage such as stamps and gift cards.
I doubt that. They've been checking receipts since long before gift cards were a thing.
They're looking at the "Items Sold" number, and comparing that to the count of items in the cart. They may also be looking specifically for expensive items, to make sure there wasn't a substitution made.
Sam's Club and Makro do this in Brazil. All items ate checked, not just the expansive ones. Costumers don't really like it, at least the firsts times, then get used, 'cause you know, we do know some Brazilians.