People who do that have one thing going through their heads: "What will my target do in reaction to this?"
If you flare your temper at them in replies to things like this, they will only try to antagonize you further to get further pleasure from seeing you lose your cool. If you ignore them long enough, they will go on to find someone else. People find those who lose their tempers easily as a source of entertainment and not as a possible threat if they do persist in the behavior, which is a very dangerous (and yet, very common) style of thinking.