That's exactly what happened in a bunch of major cities ( Detroit, Newark, Baltimore, Washington DC ), and a major reason why those cities are in such bad shape. Read about Coleman Young for a taste of this history: http://en.wikipedia.org/wiki/Coleman_Young
Corrupt mayors didn't help, but let's not act as if this was some sort of problem that was borne solely out of poor management.
Interestingly, if there are more racist white voters than racist black voters, the racist black voters actually improve the quality of the decision because each racist black vote cancels out a racist white vote. This makes the best candidate more likely to win the election, because the best candidate has fewer votes to make up. (Unless the racism helps them, in which case it doesn't matter.)
Let's create a model to look at how this works. Say there are 30 voters. 6 of those voters are racist; 4 only vote for whites, 2 only vote for blacks. Of the remaining 24, all try to vote for the best candidate, but are only able to successfully determine the best candidate 52% of the time.
So there are 24 voters trying to choose the best candidate.
Without the racist black voters, the black candidate starts out at -4 votes.
With the racist black voters, the black candidate starts out at -2 votes.
With or without the racist black voters, each candidate needs 16 votes total to win. (A simple majority of the original 30.) Now let's assume the black and white candidates are equally likely to be the "best" candidate. Given that a voter trying to choose rationally is likely to choose correctly 52% of the time, we can see that the system with the racist black voters would choose the correct candidate a much higher percentage of the time if we were to run the simulation 10,000 times.
edit: I actually tried this in excel, and the results were quite interesting. 52% is way too low though, rather try 60% instead. What we see is that without racist black people, the best candidate essentially never wins.
Bad decision in the sense that race played a role where it shouldn’t. This works only in two-party systems like in the US.
And Obama didn't lock up the black vote until white Iowans voted for him. Hillary was winning the national black vote 2-1 until after he won the caucuses. The evidence is pretty clear that black people don't just blindly vote for other black people - they vote in their self-interest, and until Obama seemed credible, their self-interest was to vote for Hillary.
Things didn't really shift until the Civil Rights Acts in the 1960s were passed, coupled with Great Society programs of Johnson, that put blacks in the Democratic camp for good and sent Dixiecrats to the GOP.
But one can make a similar self-interest argument for white people voting based on race also.
The question is when does self-interest turn into racism and whether the notion of racism even applies to voting.
It's not so much about voting for race, as much as it's voting for a candidate that is more likely to understand your experience and as a result, will be "thinking of you" as he or she makes decisions.
It explains why so few minorities (Specifically, blacks) have made it to the Senate since Reconstruction.