Law or not, I don't think that makes sense.
As I understand the law, he could have stayed and appealed the decision. Not that they're going to tell you that or help you out - they're allowed to lie to you and so on.
Strip searching seems very excessive, as does the entire handling. But fundamentally, interrogating someone that appears to be going to violate their visa is one of the reasons for having CBP at all.
The mishandling is the primary issue at hand.
I wish there were honest statistics available, so that people could know for a fact that yes, there are or are not actually a lot of extreme cases like this.
Best stat I can think of is "how many strip searches resulted in allowing the person to enter the country", which is also probably fairly low. By that time, they've probably decided to deny you entry.
Neither shows or prevents mistreatment that the CBP deems OK, which seems to be the case here.
They probably do have a law saying anyone who is denied entry is strip searched and not allowed to contact anyone.
The shorter version: jackasses getting around a law cause more laws, ruining things for everybody.
Seriously? If the US didn't have immigration requirements, half the world would move there, causing the society and infrastructure to collapse? I can't see how unrestricted immigration benefits the US at all (I'm not a US citizen).
Now, imagine that happened with his gf. Imagine its your gf being strip searched, having done nothing to warrant that.
For a country that's worried sick about 'terrorism', some agencies sure like to piss off people. Somehow, I don't think that's the correct approach.