There are a lot of reasons why dogs might cross the road twice. Maybe they’re chasing a squirrel or bird and lose track of where they are.
Or, maybe they just really like the smell of something on the other side of the street. Whatever the reason, it’s always amusing to see a dog running back and forth across the road!