They both spend lots of money on maps in the hope that users will use those maps on each corporations platform. The difference is Apple makes money selling the device and services, Google makes money selling your attention to advertisers.
The real driving force for Apple to spend that money was Google restricting features in their iOS app.