I think it's instinct, my dog will chase anything that runs. If whatever it is stops running, she stops chasing.
Bicycles and runners are her favourite. She loves going in the car, and shows no reaction to parked cars, but she goes nuts at car wheels when the car is moving.
I keep her on a lead until we are somewhere where she can do/come to no harm.