Microsoft donates Windows licenses to schools. Windows has already been made, so donating licenses costs almost nothing. Microsoft gets tax breaks for the full market price of the licenses. Microsoft gets good publicity for its generous donation. Microsoft gets to lock in a whole generation of students into Windows, establishing mindshare. Microsoft gets to fend off Free and Open Software, such as Linux, by positioning itself as the de facto standard.