When police get a warrant to search your home, after they are done you can get a new lock and recover anything taken as evidence eventually.
When an investigation gets permission to surveil you, it's a temporary affair and records can be stripped of irrelevant personal data before any sort of release or duplication.
Even in the best case scenario, encryption is used in cases where incidental damage cannot be recovered from like above. Encryption is an attempt to restrict an easily accessible, indefinite lifetime, and infinitely duplicatable piece of information to only be meaningful to intended owners.
Let's imagine a very generous scenario, a chat program has encrypted chat such that every message can be unlocked with either the participants' keys or a unique key per message stored and kept safe by the service owner. Law enforcement can request chat logs and the service can return them the keys needed to read the requested logs from the interval specified.
Similar to the second scenario above it is possible after the investigation to cleanse the records law enforcement has, but in this case they are not the primary or secondary source of that information and cannot ensure that all records are permanently safe from outside parties. Anyone can easily get copies of the encrypted versions of communication done over the internet with minimal effort, this means someone can hold on to encrypted information in massive dumps and await inevitable breaches in company security that retroactively reveal all previous communication.
This is the best case scenario, it completely ignores things such as how any investigation is one day inevitably going to be a malicious actor. I don't mean whatever group of people are in charge right now going bad, I mean how all countries/groups inevitably change over time for better or worse. If a bad actor is in a position of power for even a moment, they can retroactively spy on you at all points in the past you use a weakened encryption. Imagine an extreme vegan political group making eating meat a crime punishable by death even if in the past. Your chat logs about going for burgers are easily accessible. Or similarly a retroactive law against abortion.
In the case of well encrypted chat, only the participants have control over the keys and if you want to be sure something is gone you can discard the key. This is no longer the case for encryption with a backdoor.