What is religion for?

Nothing, really. Religions were created in times when people didn't know what caused things, and likewise didn't have the instruments (or minds) to find out. The most well-known case will have to be God: "Who created the world/universe/people/animal etc."