Google Maps on iOS wasn't free. Was never free. Apple paid major amounts of money for it. It may have been free to you, but not to Apple.
Oh, and Apple Maps is free to them then? Before they were paying Google to deal with gathering the map data (maps, imagery, POIs) and running the servers. Costs that were shared by Google's other users, meaning that economies of scale are in play.
Now, Apple has to collect all that map data on their own, has to run their own back-end for dealing with that data, including writing their own (still hilariously broken) search over it, their own routing software, their own traffic monitoring software, and maintain the servers running said back-end. And don't forget, they had to build all that, so you need to factor in buying servers and writing all that back-end software.
I find it quite likely that sticking with Google would in fact have been far, far cheaper than building their own. The only reason they didn't is because they hate Android that much.