Good, don't come then. I've traveled the world a decent bit, and there is a reason why people from all over the world come to the US to start a business or try to make financial independence and a better life from their home country.
Things like this (and this[1]) just help destroy the idea that the US is a special haven of freedom that cause many people to want to visit in the first place.
At least in my opinion USA is one of the last countries on earth which is offering near 100% freedom of speech, largely free trade and individual freedom, right to own guns and many other things which you can not own without nonsensical bureaucracy, huge landmass, top notch education and a growing capitalistic society.
The way I see it countries like France, UK are pretty much going down the drain through which welfare states often go. In these countries government perhaps don't even need your password. They can do all sort of unauthorized searches any ways. Australian society remains hostile to non white people and China lacks individual and political freedom. Canada is close but it is far too cold for me. Japan is pretty much isolated because of the language and unique culture.
People that don't want to get caught entering under false pretenses can just delete social media or not post dumb stuff on it in the first place. This isn't gonna catch spies[1] and terrorists or whatever, it'll prevent visa overstays and stuff like that.
[1] Though I heard of one spy getting caught cause she tried to collect frequent flier miles on her main account while traveling under aliases. So, who knows what kinda things will happen every now and then. But that can't be the primary aim of the idea.