The Democrats embraced the politics of the Sexual Revolution after about 1972, when the McGovern wing of the party ascended to power. Prior to the Democrats going all-in on divorce, abortion, fatherlessness, etc, evangelicals split about 50/50 Democrat vs Republican. There hadn't been an anti-religious force in politics, so there hadn't been any reason for religion to become a political faction. Lee Atwater saw the way social trends were going, and saw that on everything from family issues to martial valor, the South was becoming more aligned with the Republicans than the Democrats year after year. This largely annoyed the Republicans, who never really wanted to stop being the party of big business and international trade.