Google Maps always do that in Brazil, it's so annoying.
It recommends alternative routes to "save" you a couple of minutes. Dirt tracks, unmantained roads and sometimes danger neighborhoods (favelas).
They should fix the algo to prefer the main roads and streets. At least give a configurable threshold. It seems quite doable with all GPS data/street images they have.