I don't think that groups of people have switched Parties so much as both Parties have very consciously sought out and changed positions in order to attract groups of people. The best example of this is LBJ and the Civil Rights Act. He was pretty damned racist, and he made the decision to lose Southern Conservatives, in favor of people of color. I think it was simple math, not some higher ethics!

Trump embraced that choice and went full KKK.