The Foundation's charitable activities involve funding educational programs for children.[0] Those educational programs are funded via the profits made from selling Raspberry Pis[1], so their charitable goals are aided by selling as many Pis as possible; that's helped by ensuring that reliable corporate customers that place orders in the thousands are never left high and dry.
The pis are getting sold either way. See op's comment about publicly available pis getting snatched in seconds? RBP doesn't need a deal with a large corporation to sell off their inventory.
Presumably the Foundation sees a future (which is pretty close at hand, if the Foundation is to be believed) where there is no longer a shortage, at which point they would like to continue having industrial customers (which you won't have if you can't guarantee supply). Eben Upton has repeatedly spoken of his desire not to leave companies whose business depends on supply of Pis without stock, thereby endangering their survival.
It's also worth noting that the rapid selling out of hobbyist inventory happens in part because much of the supply is earmarked for industrial customers; we don't actually know if that would still happen if all Pis were sold directly to hobbyists.
[0]https://www.raspberrypi.com/about/
[1]https://en.wikipedia.org/wiki/Raspberry_Pi