The Democratic Party and Republican Party traded ideological places. The Democrats used to be the conservative party, the Republican party used to be the liberal party. The transition happened gradually, first at the federal level and later at the state and local level. Appalachia has historically been conservative. But, the party that represents that ideological leaning has changed over time.
Republican Presidential nominee Goldwater's "Southern Strategy" is commonly viewed as a turning point, but it was starting to happen in the late 1950s and had mostly run its course by the late 1990s. This process is called "realignment" and came to Appalachia, like a lot of national trends, on the late side.
Also Appalachia's Democrats were disproportionately led by private sector, blue collar union members, especially mine workers. As the mining industry has collapsed, and as private sector unionization rates in Appalachia have fallen even further, the core institutional base of the Democratic party collapsed, and national tends in cultural affiliation with the respective parties (which has seen non-college educated white voters trend Republican and college educated white voters who are rare in Appalachia trend Democratic) gained a larger role.
Voter registration is a lagging indicator. Many people register to vote as teenagers or in their early twenties and never change it again, even as they become senior citizens, especially in places like Appalachia where people are less likely to move to new places as adults. If you don't bother to vote in primary elections anyway, there is no compelling reason to do so.