Just like they know with pretty good certainty who is plotting to commit a violent act and who doesn't.
It's not perfect but the people at the border control are professional lie detectors and will spot it if you are lying and just won't let you in until you tell them the truth and prove it.
Unlike them, most people are not professional liers. As a result, mostly honest people will suffer.
RE: Gov't Regulations vs Crypto Freedom