It is just a behavior that dogs do because they see something moving quickly beside them. If you want to work on trying to break it, you would need to come up with a command such as 'leave it' and then reward when the dog appropriately does not perform the behavior. Our one malamute would be fine with passing cars - unless there was a dog in the back for instance of a truck. I think he thought that the dog could bite him in the car - ridiculous but that's the only thing we could come up with - so he tried to bite the dog in the passing car or growled at it before it 'got him.' It was kind of comical. My mother's lab barked at cows and dogs as you passed them nonstop and she happened to think that it was funny, so she didn't ever work at stopping the behavior. It comes down to whether you can live with the behavior or you find it annoying - or distracting - when you are driving or riding in the car!