It’s due to the third party doctrine, a Supreme Court precedent
https://en.wikipedia.org/wiki/Third-party_doctrine