From Universal Declaration of Human Rights (UDHR) accepted by the United Nations General Assembly on 10 December 1948 -------- Article 12 No one shall be subjected to arbitrary interference with his privacy, family, home or correspondence, nor to attacks upon his honour and reputation. Everyone has the right to the protection of the law against such interference or attacks. https://www.un.org/en/about-us/universal-de…
Border searches aren't arbitrary. Sure, in the sense you may or may not get searched, but not in the sense that cops come and turn over your house for no reason. Crossing the border, you know some fraction of travellers will get searched, and that the government does so lawfully. Antagonising law enforcement in this situation is not a smart move, no matter how righteous you feel it is, unless you're doing it as some form of protest.
With that said, I do think searching phones is absolute bullshit, and I'm not arguing in favour of it at all.