Corporations generally donate to further their own agenda and for their own good. If they can use it to accomplish vendor lock-in then they will do so. Sometimes, they can only use it for some feel-good PR. The former is dangerous and should be resisted, just like a trojan horse. The latter is about the same as advertisement on "free" web sites: You accept it as necessary for the operation of the sites, but you mostly just ignore it.
You raised good points, so let me clarify: The different paragraphs talk about different examples of how corporations use donations to schools for their own benefit. When I mentioned the Microsoft example, I also mentioned the additional fact that their donations don't cost them much if anything. But I didn't mean to imply that this would be so for every company's donations. Clearly, someone donating hardware has a cost, no doubt.
But do I object do schools getting free hardware? Well, in the case of Apple, it wasn't just the hardware, but its own distinct eco system: The operating system, the software on it, it was all pretty much closed and Apple specific. So, there was definitely more than just "generic" hardware. Also, computers at schools were still quite rare at that time. Apple recognized that it could get in early and make a lasting impression on those students.
These days, if Dell or HP donate PCs they will probably just run Windows (which is more of a benefit to Microsoft than Dell and HP). So, the advantage for Dell or HP would be quite minimal: Nobody remembers their little logo on the back of the monitor if everyone's looking at the Windows on the front. Tough situation for Dell and HP, since they are merely producing commodities in that market.
That's like someone giving you free water when there is already plenty of water to choose from: You say "Thanks!", but then they're forgotten again.