So, we have come like that, by gradual evolutionary process, in the act of creation. And among human beings also, all are not of a uniform type. They say that there are about eight million types of living species in this universe. You cannot know who they are, where they are, and all that. But, as you know, even among the human species, all people are not of the same category.
Some people are very good in nature.
They will do only good. This is just to answer your question, how things came about, in one way. A good man is one who considers other people as equally important as he considers himself. When I consider you as a person as important as my own self, I will treat you in the manner in which I treat myself. This is the characteristic of goodness.