Religion did not just determine where people went to church, but also whom they hung out with. It determined where children went to school, what choirs they sang in and what gym clubs they joined. People met their partners in church and formed friendships and family bonds that survived emigration to other countries. See this overview of popular destinations per religion to see where some groups went.
And don’t forget that people were doing their shopping mostly with shop owners from the same religion.
Between roughly 1880 and 1960 the religious segregation in the Netherlands went into the extremes.
Before and after that period the peer pressure to mix only with people from the own religion was a lot less or vanished at all.