Morality is based on the personal desire to not be hurt or to feel discomfort, and ultimately to not die. Morality is selfish.
It evolved because we were clever enough to understand that we could help each other achieve personal comfort and a better chance of avoiding death, if we worked together. In order to work together and protect us from the dangers of life, we found new dangers in each other, and thus morality was born.
Our own survival has always been the basis of morality.
Just my thoughts ..