ANDY'S ANSWER: Unfortunately, you will run into people your whole life who are missing a filter between their brains and their mouths.
These are people who think they have the right to say whatever they want, no matter if it is inappropriate or if it will hurt someone.
What they seem to enjoy most is the reaction from the person they are targeting, and from the people around them.
My advice is to just not give him an opportunity. Stay away from where he is and keep walking with your head up if you have to pass him.