There are quite a few situations where you have an obligation to not delete data so "legally you've done nothing wrong" is probably overly broad.
Opening up to any situation beyond that would be dependent on the context of that situation.
If I am missing something, please explain explicitly what you are referencing.