My kids have consistently behaved better when we are cycling, whether they are three or thirteen. Even if we aren't getting along great at home, our bike trips together tend to go smoothly.
Here's my parenting theory.
Just as video games engage by providing a series of small successes, Sidewalk-biking for the youngest cyclists works to build confidence and self-esteem. At each block or alley, she successfully stops, checks traffic, and waits for the signal to go- she's "cleared a level". There's also encouragement for good hill climbing and careful braking when going down hill.
Eventually they master cycling skills and regular encouragement is no longer needed. Yet, we still get along better when we out on the bikes. Why? The fresh air and exercise helps. I love biking so it's no surprise that I'm in a better mood when I'm out cycling.
If we are out biking for hours, eventually some of us will start to get tired or hungry. Because we generally along well on these outings, we try to recognize these as systemic issues, like it's time to take a break or have a snack. With some rest and snacks, we are usually back to treating each other decently and ready to finish the ride.