They didn't. As far as I'm aware they bought the competition. Waze serves a slightly different purpose to Maps, being a friendlier face that's more of a driving GPS than Maps is. And while they don't really market it as a Google product, people will use it thinking it's a good alternative to using Google or Apple.