It's only relatively recently, since the 18th century, that people expected religion to make them happy. In a way, it's a perverse affirmation of the Enlightenment.