Additionally, there is the safety aspect. It is more than just pedestrians at risk, there are other automobiles and structures to be concerned about. Tertiary streets, for example, probably won't have things like guardrails.
Areas zones as residential should probably not have much through traffic. It is expensive and dangerous. The roads constructed to deal with that traffic are also built to withstand that higher load. Routing the traffic elsewhere will not significantly reduce the maintaining of said roads.
Err... I modeled traffic. Hopefully that explains it. There's some good write-ups as complaints about Waze, if you want a keyword to find more info.