>We are seeing such things dissolve because we have other options these days.
1) Do we have other options? I think we do, but I don't think the saturation is nearly as high as churchgoing or temple-attending was throughout history.
>In the past, people often grudgingly tolerated it because they had no place to go, not because being part of some larger community was some wonderfully fulfilling experience most of the time.
2) Religions grew and spread in every civilization for millenia. Ancestor worship in East Asia. Hinduism in South Asia. Animism among natives everywhere. Christianity in the West. What if religion and religious community grew and took the forms they did, because they met humanity's social and emotional needs?
So I would restate the original comment as asking (i) what problems arise when something everyone depended on so long disappears in a relatively short time, and (ii) how can we handle those problems. Importantly, stating these questions isn't suggesting that everyone needs to return to religion (which wouldn't even be possible without un-discovering science).