Seriously... with the double standards
Quit griping, whining and crying. You may not like it, but face it... you put yourself into the predicament. Do you complain when they look thru your backpack or luggage? No, because you know it's part of the traveling routine when you go thru customs. You can be upset all you like, but it comes down to common sense, and understanding that governments will always protect themselves and their people.
Look... if you don't like the laws of a country, then don't go there. There are many laws in every country enacted to protect the people and the government. Whether you disagree with it, doesn't matter.
I don't hear people griping because Saudi Arabia, Egypt, Russia or China (who all have similar laws) made them unlock their electronic device.
Let's talk common sense. If you travel with confidential documents on your device you're an idiot. These devices are too easily lost or stolen. Given enough time, the person who controls the device also controls the info on it. You're better off setting up a VPN to a system which holds the files as you need them.
If you're not friendly to a government then you're open season for this government and it's allies. You travel to another country, leave your laptop in your room to go eat, shop, sight see... whatever, then don't be shocked if 3 months later your AV picks up unique spyware on your computer. Likely placed there by a country's intel agency. Or at least... they looked thru it and possibly downloaded something while you were out of your room. This isn't limited to shady governments; this happens with ALL of them.