I swear that it happens whenever someone crosses not at a pedestrian crossing too - the driver sees a pedestrian where they believe they shouldn't be, and decides to get closer faster, to teach them a lesson.
When learning to drive, I was taught to watch for hazards and react to them by avoiding any kind of collision - doesn't matter who or what the hazard is, I lift my foot so I'm ready to brake if I need to.
I was also taught responsibility, because at your hands you have a deadly weapon.