Any company that isn’t completely incompetent has some revision control solution like GitHub. It saves the original and all the changes throughout the life of the code. It’s designed specifically to allow developers to update or even delete code while still maintaining records
An indie dev recently lost the source code to their early access game and had to remove it from Steam. If this law was in place, what punishment would they face for their incompetence? It would be rare for a massive company to not have source control, but it probably isn’t uncommon for small first time devs. So now you have a well intentioned law putting regulations in place that hurt small devs and raise the barrier to entry.