A long time ago, there were many wars, battles, shootouts, and a whole lot of lawlessness. It was mayhem. Nobody could trust just anybody. Through time and as an adjunct to peacetime, when two sides wanted to show they did not carry any weapons with them, they would show their RIGHT HAND and pull it forward (typically being the shooting hand). This was to indicate and assure the other that no weapon was ready to be used. Once the hand was pulled forward and shook, it was to establish a consensus and understanding between the two sides. Through time it became a gesture and signal of peace and friendship upon meeting somebody.
Today, it is established universally that when you first meet somebody and say “Hello” or “Nice to meet you”, you shake hands. However, the best use of this “handshake” gesture in our modern day lies closely to its initial significance and goal: which was to establish a “deal” two sides whereby both sides promise to keep their word and not break it and thus, creating possible chaos. This is why, whether it was hundreds of years ago or today, when we make a “promise” or a “bet” with somebody, we shake hands to guarantee that we will follow the rules established and accept failure or defeat as peacefully as we could.
I am personally so happy this gesture involves the right hand, because I have a firmer grip with my right! That, also, by the way shows that you are more genuine, when you shake hands with a firm grip! A firm handshake confirms that you really mean it when you say you offer peace and respect for the opposing side!