So yes, in this case, it didn't work out for the general public. That indicates no intention of wrongdoing, nor does it indicate that the system is broken. Equity values on the whole tend to rise over time, which means that charitable stock gifts overall (especially those that are held for long periods of time) are actually better for the public than cash donations.
It's not about wanting the stock to do poorly; as the chief executive, he knows where he plans to go with the company, and if he doesn't see it going far, then at least he can save some money. The fact that investors interpreted the move this way indicates that it's not about hindsight, but a poor forecast.
Your point about values rising on average is a good one though - it means that though some of the rich may be getting away with more money, overall donations are still going to balance that. There are still some other issues though.
Investors appear not to have interpreted it that way. That interpretation was disingenuously rendered by this article’s author in support of his premise for it. See [1].