Even if a company wouldn't donate any of their profits, if they make an investment based on laws, and the government then changes those laws to make what they are doing illegal, that's still an outcome that we should avoid; both out of a sense of fairness, but also out of self-interest, otherwise people will make fewer investments, which is a bad thing.
(Though no idea on the details in this specific case - I just dislike this question and its invalid assumption.)
Change of law risk is also a business risk. You can see this most clearly in situations like companies constructing tax avoidance schemes. Everyone involved knows that the law may well be changed to close the loophole being used. So the question is whether you can make a profit off the scheme before then. Ditto if you're a brewer and the state changes the alcohol laws in some unhelpful way. The situation here isn't that different.
Even if a company wouldn't donate any of their profits, if they make an investment based on laws, and the government then changes those laws to make what they are doing illegal, that's still an outcome that we should avoid; both out of a sense of fairness, but also out of self-interest, otherwise people will make fewer investments, which is a bad thing.
(Though no idea on the details in this specific case - I just dislike this question and its invalid assumption.)