A lot of this had to do with the Industrial Revolution, and then later, the rise of the Christian Coalition as a viable political force.
In the Industrial Revolution, it became painfully clear that local governments could easily be corrupted by burgeoning factories and corporations. Republicans still supported the autonomy of the corporation in favor of the spirit of capitalism, but Democrats thought that unionizing workers in the short term, and appealing to the federal government for regulation for the long term was the best way to protect the working class from the profiteering habits of the business owners.
The situation changed more in the mid-to-late-20th century, when the Republicans began welcoming the input of the Christian Coalition as a base of support in the Republican battle to keep hippies in check and the Vietnam and Cold Wars going, in the face of the Civil Rights movement. The fundamentalist Christian base brought the point of view that behavior should be mandated at a federal level, and strove to change the tide of the Supreme Court post-Roe v. Wade.