Edited.
Maybe i am too autistic, but i don't get why anyone should greet anyone in the first place. I don't see it a sign of respect, but just another unwritten rule like small talk.
Class or age don't matter, because i greet only if i want to and i don't expect random people greeting me either, no matter if i know them or not. People who i know, know that i enjoy their company because we talk and hug a lot.
I see good bye more relevant "greeting", because it gives clear signal that we are separating for now.
Different societies with different rules and cultures, in the western countries I think nobody gives a fuck about your age and could greet you at their own will, over there people don't expect greetings or feel entitled to greetings from younger citizens, you don't go greeting any stranger cause they're older, to cut long story short, it's a thing of choice.
In African culture it's like a taboo to not greet the elderly, some elderly see it like a sign of disrespect to walk past them without greetings some culture even demand that the younger ones prostrate to greet the elderly ones. So as earlier said, "different society, with different culture and rules'.