When I drive to work and I use navigation, there is a portion where I go off the recomended route (US 77 in Lexington OK) to go to the post office, Waze will always try to make you back track to the point you deviated until you reach at least a minor highway. The post office is one segment away from a minor highway (State Hwy 39) but yet it will make me backtrack through town to the point of deviation. Once I am on the major highway Waze will recalculate and navigate me back onto US 77 where it meets up with SH-39.
I have taken this as normal behaviour for Waze based on other forum posts where Waze can't calculate every senario out there so it is using the data it already knows to get you back to the precalculated route.