The Fourth Amendment to the U.S. Constitution was written in order to keep the government from invading the right to be left alone--today known as the right to privacy. The Framers who wrote the Constitution, and Jefferson and his colleagues who insisted on the Fourth amendment among others, had suffered grievously at the hands of the British king and his soldiers.
When King George III and Parliament were looking for new ways to extract revenue from the colonists, they devised the Stamp Act. This legislation required that on every piece of paper in the homes of every colonist there must appear a stamp issued by and purchased from the British government. This applied to all books, letters, financial and legal documents, even to pamphlets to be distributed and posters to be nailed to trees.
Question: How did the king and the Parliament who were 3,000 miles away and across the sea, know if colonists had the stamps on the papers in their homes?
Answer: Parliament enacted the Writs of Assistance Act. This legislation permitted British soldiers to write their own search warrants in which they authorized themselves to enter the homes of the colonists ostensibly to look for the stamps.
The Stamps Act and its enforcement proved so unpopular here that Parliament eventually rescinded the law. But the die had been cast, and the seeds of revolution had been planted. And thus, when the Constitution was being drafted after we won the Revolutionary War, the Fourth Amendment required that only judges could issue search warrants; and they could only do so if the government presented evidence of a crime about the person, paper, or place to be searched, and the warrant needed to describe specifically what the government was authorized to seek and seize.
All this worked generally well to keep the government from engaging in fishing expeditions, until 1986 when Congress enacted the Electronic Communications Privacy Act. This law in fact did not protect privacy; rather, it permitted federal agents to invade it. It provides that digitally stored information that is less than 180 days old may only be sought via a search warrant, but data older than 180 days loses that protection. The loss of the protection is an unconstitutional invasion of the right to privacy mandated by the Fourth Amendment, which Congress is powerless to avoid or assault.