This still doesn’t explain why the US Customs Agents have permission to search your phone without a warrant.
Travelers just won back a bit of their privacy at the border
Travelers worried about having their smartphones or other electronic devices searched when they enter the United States can breathe a small sigh of relief: U.S. customs agents may be more limited than previously thought in their ability to browse the contents of your phone.