Google/Waze will volunteer users to take alternative routes to scout out ways around congestion. It can be a better route, but you are the guinea pig, so you can get the short end of the stick.
There also is learned driving habits that may inform routing choices.