It was narrated that Samurah bin Jundab said: "The Messenger of Allah ﷺ commanded us to greet our Imam with Salam, and to greet one another with Salam".
The Prophet Muhammad also taught us that when we greet someone else with salam, it will be returned back to us from Allah Almighty Himself. This shows us how much Allah values kindness and respect between people; He rewards those who are kind-hearted towards others even if they do not receive anything in return. Furthermore, this hadith teaches us about humility; when we greet someone else first instead of waiting for them to initiate it first, it shows that we are humble enough to take the initiative ourselves without expecting anything in return from them.