This is a good question. I worked on a few campaigns in Maryland, and I'm still baffled.
I'm still not entirely convinced that Gansler would have lost. He had questionable judgement and gaffed, but he was proactive in running against O'Malley and his tax increases. He also talked about how Maryland was losing businesses because its taxes made it less attractive than Virginia, which could have blunted the main justification for Hogan's candidacy. Anecdotally, I know numerous people who supported Gansler in the Democratic primary, but supported Hogan in the General Election.
I think it really depends on what type of campaign Mizeur ran, and how much distance she put between herself and O'Malley. I don't think Hogan was some sort of rockstar candidate, nor was his campaign
that exceptional (though some of
his ads were really good). I still think he was in the right place, at the right time.
I also think the Healthcare Exchange debacle is an underrated factor here. People really questioned Brown's competency after that.