First of all, if you won't enter your password, they confiscate your computer.
Since I wanted to keep my computer, they opened windows explorer and searched for all JPGs and GIFs. Then they asked me, "What kind of photos am I going to find on here?" It was a female agent, and the conclusion I came to is that they're looking for kiddie porn.
I had no exciting photos on my computer, but I did have a shit-ton of boring photos so it wasted 30 minutes of my time and made me think that they think I look like a perv.
Not to mention, the legality of porn varies drastically over jurisdictions.
For this kind of scenario, I have a 2011ish MB Air that is too small to do anything (4gb RAM) and gets re-puppeted fairly frequently to test the system. When I worked in China, I took my iPad, Bluetooth keyboard, and strongvpn account.
Of course, these are all without me trying to hide anything (the encrypted loopback is mostly a matter of principle, I don't actually have anything stored in it).
Still, this is a bad policy which you guys should try to get repealed. If they do this regularly, they must obviously stumble across home-made porn all the time. None of my sex partners have ever consented to have their naked bodies examined by some high-school dropout border guard somewhere.
Like you say, there is little a spot check could easily and quickly find. Therefor, IMHO there must be another reason. So, what if they are not looking for anything? What if its just to put people under pressure in the hope of having the "suspect" give away signs of guilt? That would be my rational.
Oh, another thing, checking to see that it is actually a laptop and not a banned fruit.
In all seriousness, I don't think there's anything in particular they're looking for. They're just looking for anything that gives them suspicion, which gives them an excuse to question and investigate you further.
I haven't crossed the border in the past decade, but may need to semi-frequently in the near future.
Still it is outrageous that a court feels this is not a violation of your 4th, 5th, and 14th amendment rights.
Which always makes me think of this:
Bye-bye laptop for a few weeks.
I'll get me coat....... ;)