Because laws are not about justice. If you get something stolen you need to go to a judge to get a sentence that gives it back to you. You cannot take justice on your hands and expect to not be punished.
If the thing that you are trying to do is legal by universal laws, international laws and national laws (in order). You don't really need to worry.
In that stealing example let's assume someone stole something and you "stole" it back. Good luck for the first stealer to initiate a court case - which probably the stealer will not initiate because he will lose it plus with the expenses for the court. No court case meaning no complains therefore no crime.
Just because you pirated a game that you own a copy, in order to play it on newer version of operating system does not make you criminal. You may need a court decision only if you are not able to private or fix it without the company help but that's all.