According to dog experts, dogs stick their head out of moving cars to capture the smell. They are not interested in the scenery or breeze, but the different smells they get when the vehicle moves. For more details on this, go to http://www.mentalfloss.com/blogs/archives/123478.
I agree with loisewanjihi. It has to do with the kalaidoscopic bombardment of scents the blowing wind carries. Dogs noses are VERY sensitive and dogs also have scent receptors inside their mouths. They put their head out, face into the wind, mouth open, and its like scent heaven for them.
It is actually because dog get car sick very easily and when you and me look at the horizon that's what dogs are trying to do but instead of looking at the horizon they stick their out the window to get the cold air and that calms them down very easily. And they are also looking at the horizon. And some times it's just hot and they just want to get a breeze of cold air.