Google undercut Apple. Google couldn't let Apple take all of mobile because that's where computing is going. No one was even close to where Apple was then and its taken android years to catch up. Thats the first reason.
Second, Google is a team player. The web is more profitable for everyone when things are open and free. Everyone is better off with a smaller slice of a bigger pie. Android has made a lot of people a lot of money.