I’ll answer what happened in 2010 - the midterm elections. For the four years or so previously, the Democrats had gotten high on the notion of demographic destiny and the idea that a changing electorate was going to deliver them a 100 year majority. When Obama won on 2008 that was taken as proof of concept “YEAH, IT’S HERE, IT’S REALLY HERE!!!”
Then the midterms happened and Democrats realized that without Obama at the top of the ticket, their coalition didn’t do a particularly good job of, well, coalescing. They realized they needed something else to keep this group of voters with interests at odds with one another together. Insert the oldest trick in politics - a common boogie man. Thus the emergence of Identity Politics as we’ve come to know them today.