They choose to rely on Google. They choose to enter those agreements. They choose to ignore maps for the first 5 years. They choose not to start planning to move away sooner. You act like they couldn't put any effort replacing Google until the last minute. It wasn't.
They screwed up and released a crappy product from choices they made. End of story.
Waiting to release the original iPhone until 2015 when Apple Maps was absolutely perfect would have been a choice, but not a reasonable one. Bootstrapping with Google's service was quite logical, and proved to be very successful.
And Apple Maps really isn't that bad. Perhaps not Google Maps good, but better than what the iPhone had prior. It is still a major upgrade for iOS users, even for all its faults.
I can also reasonably believe that they weren't serious about investing effort into it.