I know in various circumstances- not just riding- if a stranger says something to me, by the time I ascertain if they were talking to me; and think of how to acknowledge them...they are long gone. Never mind that I'm in my own world half the time, and wouldn't even notice if someone waved, because I generally pay attention to what I'm doing, and don't normally look at people unless I have a reason to. I'm sure lots of people think I'm a little stuck-up A-hole...but nothing could be further from the truth- I'm not all that little....
Those guys could be agonizing over not having reacted with a greeting fast enough because they were taken by surprise...or maybe they're just jerks.....either way, OP, you come out looking like the better guy.