It must be the case that evidence can be either damning or exculpatory, and either way you're not allowed to destroy it. Otherwise destroying evidence would be incentivized, because once they can actually prove that the damning evidence was present before you destroyed it.... that proof is as good as having the evidence in the first place.
A judge isn't a robot. If you say "I hit an emergency button to reformat my hard drives as the cops were breaking down the door, because I was preparing to sell those drives on ebay and needed to clean them up", the judge is not obligated to respond "Shoot, I can't prove otherwise, you're free to go."
That's probably a decently clever approach. Thank goodness most criminals aren't clever. Or at least, so we assume based on the percentage of them who get caught.... Oh dear.
A judge isn't a robot. If you say "I hit an emergency button to reformat my hard drives as the cops were breaking down the door, because I was preparing to sell those drives on ebay and needed to clean them up", the judge is not obligated to respond "Shoot, I can't prove otherwise, you're free to go."