Not all dogs do, but the larger breeds have discovered that there lies a cornucopia of smells, and remember a dog's sense of smell is thousands of times stronger thsan ours. The prospect of all those ever changing airborne odours is too good a chance to resist, hence, ears flying, nose in overdrive - one happy dog.
So they can smell where they are going ! Even when lying for ages on the back seat, with no view, ours get up to look out when a mile or more from home; prompted by the smells of the track home.And of course , as said, there are always new smells to enjoy in the journey just as we , sight-oriented creatures, enjoy the views.
This brings a tear to my eye... When i was little we had a beagle cross dog called Billy, he used to stick his head out of the window whilst in the car. It was SO funny, his eyes half closed and his ears flapping in the wind. Made me laugh. He was such a lovely dog...Thanks for bringing back a memory that i had forgotton about.
Because silly people let them! Once you have seen what happens to a dog that had it's head out of the window immediately before the driver has to brake suddenly (decapitation) you'd make sure the windows were kept shut ...