Windows is now a burden for hardware manufacturers: its license is a significant part of the computer's price and Windows 8 doesn't drive sales. Desktop operating systems are becoming less important, computers use less power and offload processing to the cloud.
A desktop operating system built around a browser and a mobile operating system built around openness made Google the obvious choice for Microsoft's OEMs. Two timely solutions that allowed companies like Samsung, Asus, HTC to come up with products people wanted to buy. Hardware companies usually don't write great software, so Google wrote some of the software and freed them from Windows. And now the popularity of the Windows-free products powered by Google made Windows free.