The last reason religion was invented. What is the meaning of life, we cry (to god, or whatever). Why are we here? What is our purpose? We cry out for someone to give our lives that all-important purpose.
Atheists know that life APPEARS meaningless because IT IS. We know that there is no god(s) to give our life meaning/direction/whatever. The truth is that Life has the meaning that YOU give it, not what someones who may or may not be real gives to you. YOU CHOSE to live your life the way that you do (horrible realization, ain't it?). If you are kind and care for others, that is YOUR CHOICE. If you are a nasty rotten sh*t, that is also YOUR CHOICE. We are free as birds; free to do well or do badly as we CHOSE.
(A last note: a sixth reason for religion eventually at some time appeared; the use of it to collect power over others. I am kind enough to think that this did not happen immediately, but later on as certain people saw that religion could be used cynically for their own purposes. Now of course, we could argue about how widespread religion-to-be-used-as-power-over-others is at the tops of most religions ....).