I doubt it was the only reason, a large part of the project IMO being a show of technical prowess, a “come and compete with us if you think you're hard enough” message, but I similarly doubt it was at all an afterthought.
Location information is valuable for advertising and other uses, and if you combine many users turning GPS off to conserve battery¹ when they didn't specifically need it, with cell-based location information not being particularly fine-grained[2][3], being able to track location by wireless AP proximity is a pretty valuable extra option. I expect there would have been a fair few people tasked with coming up with ideas for how to collect enough data for it to be a practical option⁴.
[1] IIRC this was before easy controls to stop apps having access to location data if the hardware was turned on
[2] in a crowded city you might be able to track someone to within less than half a mile, but elsewhere this potential error is much higher
[3] or available at all due to reception issues
[4] StreetView came before Android saw public release, so siphoning off location data from users of that OS would not have been an option that early, and even if it was would still rely on GPS use to make the data usefully accurate
Also, many devices didn't have built-in GPS (the original iPhone, for one), so how do you run location services?
There were, at the time, several crowd-sourced sites of Wifi AP locations, which devices could use to estimate location from Wifi RSSI. So making a private, comprehensive database of the same is a pretty obvious task for a company that is either trying to catalog the world's information, or that wants to do something with location-based services on mobile devices in the future.
Beyond that, getting an approximate location first is useful, even if you do plan to use GPS. It takes up to 30 seconds to download the ephemeris for a GPS satellite over the air (assuming no uncorrectable errors), after first locking on to the frequency and PRN of each satellite. Cold-start times of 5 minutes under realistic urban conditions were not unusual. Do you want to wait 5 minutes for the map to load on your phone?
However, knowing your approximate location (from nearby APs) narrows the PRN and frequency search space (and you also know which satellites are above the horizon). With ephemeris data downloaded over the internet, every cold start can be as fast as a warm start: Just a couple seconds.
There are plenty of reasons to think that Google intended to war drive from the beginning.
GPS doesn't use battery; a better description of users is they do completely random stuff because they think it might increase battery life or they dreamed someone told them to do it once years ago.
Killing apps after they're done with them is the other big one there.
Tell that to my phone. And my sports watch. GPS being available doesn't use battery on its own, but if apps actually ask for precise location information so it gets used, that doesn't happen for free power-wise.
Location information is valuable for advertising and other uses, and if you combine many users turning GPS off to conserve battery¹ when they didn't specifically need it, with cell-based location information not being particularly fine-grained[2][3], being able to track location by wireless AP proximity is a pretty valuable extra option. I expect there would have been a fair few people tasked with coming up with ideas for how to collect enough data for it to be a practical option⁴.
[1] IIRC this was before easy controls to stop apps having access to location data if the hardware was turned on
[2] in a crowded city you might be able to track someone to within less than half a mile, but elsewhere this potential error is much higher
[3] or available at all due to reception issues
[4] StreetView came before Android saw public release, so siphoning off location data from users of that OS would not have been an option that early, and even if it was would still rely on GPS use to make the data usefully accurate