You've done a good job of assessing that people who do this are "jerks." It is a shame that "jerks" can intrude on our mental space and sour what might have been an okay day. They're out there, and they can be good at creating disturbance in a person's mind. It's lamentable that they have that power.
They may not have a lot else going for them. Imagine not having anything better to do than to antagonize a stranger walking down the street. What direction do you think this person's life is going in? People like that reap what they sow. Sometimes you need to know that being a "jerk" is not without a cost. If you could see how life is going to turn out for this person, you might actually feel very sorry for them.