I'm inclined to say both. I don't think it's all religious, and I don't think it's all genetics.
But that's just the creationist in me speaking. I think God made us in His image, and put that into our hearts, and kicked off the evolutionary cycle that has brought us to today. I think God put it there, and it has evolved to where we are today.