Reportedly, it's to confuse predators but casualties do happen when near such as power lines. This shows a predator attack but I've seen starlings doing similar during migration season when there are no visible threats. Don't drive under a flock of these without a filling your washer solution tank.

http://www.youtube.com/watch?v=b8eZJnbDHIg