Charlotte a culturally Southern city, Raleigh has the research triangle which makes it more culturally Northern ala the DC suburbs or the city of Durham. At least I think that explains it very basically.
Why did this become a thing? I know as late as 2004 Wake was more conservative then Mecklenburg County (and still is today). What's the difference there?
Raleigh is significantly whiter than Charlotte but Raleigh whites are more Democratic leaning than Charlotte whites.
As for why, as stated upthread, whites in the Raleigh area tend to be highly educated, oftentimes more socially liberal types as a result of the importance of high tech industries and education to the Triangle.
https://twitter.com/PoliticsWolf/status/1194803339260657665
Not education. Its a cultural difference although Charlotte educated white areas moved left too.
Raleigh has significantly more PhDs and people with higher degrees--
on the Census website you can see that Mecklenburg has 12% of its population with a Master's Degree or higher, while Wake has over 16%--a big difference. There's actually an even bigger difference as far as Bachelor's Degrees--Wake has around 48% while Mecklenburg is at 41%. Wake County is also much more highly educated than similarly sized Southern cities.
Obviously both are more educated than the national average, which makes sense--they're cities--but Wake is definitely more so. This makes sense because Raleigh is a massive college town and includes the state's largest university, as well as many high tech companies. It's not rocket science!