Because google is essentially a monopoly. Almost nobody uses anything else. Because of this monopoly and all the advertising revenue, Google effectively has "infinite money" and uses it to metastasize into other areas such as maps, self driving cars etc. Nobody else can do this because nobody else has "infinite money", Google is losing money hand over fist in self driving cars, I seriously doubt that maps comes anywhere close to breaking even. It's all funded by the bottomless pool of advertising money.