What makes people defect from religious communities on the border to secular centers? Some combination of money, freedom, and power (to participate in shaping the wider society at scale). The cost of that defection is an uprooting and disconnection from "traditional values". I'm not as certain about this part, but part of it seems to be that it's easier to do the work of having and raising children on the border.
What makes people defect from the secular centers back to religious communities on the border? Just the opposite trade off -- less money, freedom, power. But you'll be more grounded and connected to a community, which can be immensely satisfying. And it's easier to raise kids.
Also I should note here that the borders and centers I'm talking about aren't necessarily physical -- in fact increasingly they are very much not, especially with the rise of remote work.
People in the secular center are doing a tremendous amount of very valuable and high leverage technical work to make a scaled civilization like ours function on a day-to-day basis. That's super important stuff.
People in religious (or cultural) communities at the border are doing a tremendous amount of cultural work to sustain a reserve of human values that can fuel those at the center when hard times come. Also super important stuff.
A balance in the tradeoffs between these places and a continuous cycling of people between them seems healthy to me.