The wreckage of the former "mainline" denominations sits atop a modernist theology that began to dominate mainline seminaries during the early 20th century. Eventually, many mainline theologians came to reject nearly every doctrinal aspect of traditional Christianity. The resulting secularization of the mainline denominations has proven itself a self-limiting process; as these churches become further removed from doctrinal Christianity, they are being replaced by churches that offer more vigorous spiritual messages.
Even though so many have left, those remaining in the mainline pews still overwhelmingly regard the traditional tenets of Christian belief as central to their faith. Their exodus will continue as long as mainline clergy and seminaries claim it is their right to instruct the faithful in more "progressive" spiritual and political views.
The progressives/modernists/whatever are also comprehensively failing to pass on any understanding of why religion is important to their children, which leads to hemorrhaging on the left of the mainline denominations as well as on the right.
There is a certain parallel between the decline of mainline Protestant denominations in the West and the decline of social democratic/labour parties in Europe, which incidentally shared overlapping demographics in places such as the UK and Germany. In both cases, constant watering down of core principles and doctrines made adherents/voters see little point in continuing to supporting them while making the leap to secularism/conservative parties all the more easier. Moreover, their beliefs undermined key institutions that ensured reproduction of support-liberal theology made it less likely parents would teach their children Christian beliefs and the turn to the Third Way undermined labour union strength.
I think I made that exact point to Nathan many years ago. It seems like a really salient parallel.