The answer is our history. Most men are right handed and if the button is on the right, it is easy for them to fasten the buttons if they are on the right side. Hence their button is on the right side.
When shirt with buttons was introduced then it can be afforded only by rich people. Rich lady often has maids and maids face the ladies and it is easier for them to fasten the buttons if the buttons are on the left side.