This is how you can also answer "how does Google make money off of self-driving cars?" If people aren't driving their cars, they'll most likely be on the internet during their commute. If they are on the internet, they are probably using Google.
That said, Android provides a number of benefits to Google. Namely brand recognition, user interface research, and user GPS data. Ultimately though, the introduction of Android as a cheaper alternative to iOS and a more flexible alternative to BlackBerry probably contributed to smartphone sales much larger than the actual sales of Android devices (meaning: having an additional smartphone stimulated the demand for smartphones themselves).
TL;DR: The open-source nature of Android encourages increased smartphone production and consumption, thereby increasing consumer usage of the internet, and by default, Google.