I don't see them as the same at all. If something is made legal, it indicates that the act is OK and that the person should not _continue_ to be punished. On the other hand, people should only be prosecuted for acts that were illegal at the time they were committed - it isn't equitable to prosecute people under laws they were not subject to at the time of the action, and even on a practical level it is necessary for maintaining trust in the law.