Does it just come down to marketing?
I take the view that is expressed by caro in the lbj biography. There was never really two parties in American politics more like 4 or 5 but because of your two party system they had to band together to get in power and get things done. The first faction was the Dixiecrats who until the 70s and 80s were heavily democratic to the extent that primaries in the south were the real election since no republican had a hope of winning any seats. The second was the mid west farmer faction who were also democratic and very much in favour of farm subsidies. Next were the conservative isolationist republicans lead by Taft. The fourth was the Rockefeller republican and the last were the liberal elites as it were. Essentially what happened in the 70s and 80s was a swap of two of those factions and the splitting of a third. The Dixiecrats fed up with the liberals pushing of civil rights joined with the Taft faction who were an ideological ally on this issue with their wish for a small government. The Rockefeller republican upset with the right turn of the party mostly joined the democrats or staid within leaving a small rump of their once powerful faction into the Republican Party up to this very day. With this swapping the republicans began to be seen as the party of racial politics since they were now supported by the former Dixiecrats who were the real racists of American politics. With that change the republicans slowly lost their former high support with blacks and the democrats slowly lost what was once the stronghold of their party, the old south. This took place over around 30 years starting in around 1960 with Texas almost voting for Goldwater whilst in 1948 Truman had won the state in a 65 to 24 landslide. This ended in around 1980 with Carter been the last democrat to win the south in 1976.