The reason for life is to further advance entropy in the universe. Life is good at finding resources and difussing them.
The purpose of life for humans is to follow what makes us happy the best we can. Being a good person, keeping your word, not aggressing against others is a good way to follow a path with a lot of happiness. Many religions and philosophies are about how to live a life filled with fulfilment and happiness.
For many people, getting married, having children and prolonging the human species makes them very happy and fulfilled. It also advances the reason for life in the first place which is more entropy.