The hapless 0-4 Raiders did the expected and put Dennis Allen out of his misery late Monday night, and now, to hear some tell it, the 49ers’ Jim Harbaugh is the next coach in the Bay Area who should start packing his bags and preparing to make his exit.

How it is that we ever got to a bizarro-world state where Allen and Harbaugh would be lumped together in the same sentence, or remotely linked in terms of their job security? Allen’s firing in Oakland requires no explanation. He went 8-28, committing the age-old crime of losing games in bunches, which will get you every time in his chosen profession.

Harbaugh’s job could be imperiled, if Deion Sanders’ anonymous 49ers sources are to be believed, for a very different reason. Harbaugh has won most of his games in three-plus seasons in San Francisco, but has reportedly lost his locker room, with some unnamed 49ers players no longer wanting to play for the high-strung man in the khaki pants.

“They want him out,’’ said Sanders on the NFL Network’s Sunday night wrap-up show. “They’re not on the same page.’’

Your browser does not support iframes.

Your browser does not support iframes.

This seems like the perfect time to remind those unnamed 49ers -- and anyone else who might be interested in Harbaugh’s demise in San Francisco -- to be careful what they wish for. Because if they get it, it might just come with a return to what life was like before Harbaugh arrived from Stanford in early 2011.

I’m sure 49ers fans and team ownership remember. Eight consecutive playoff-less seasons, finishing no better than 8-8 in any of them, with seven losing records. The 9-23 Dennis Erickson debacle of 2003-04. The entertaining but empty Mike and Mike Show of 2005-10, when Mike Nolan and Mike Singletary combined to win 36 of their 95 games leading this once-proud franchise.

So, naturally the guy who’s gone 43-16-1 since he got to town, leading the 49ers to three consecutive NFC Championship Games and one Super Bowl appearance, is no longer popular in his own locker room and has to go. That makes perfect sense, if you’re into letting the inmates run the asylum.

It’s hardly a secret that this shapes up as a make-or-break season for Harbaugh in San Francisco, with nothing short of a Super Bowl trophy assuring him a fifth year in 2015, contract extension in tow. Harbaugh’s shelf life as a coach seems destined to be habitually short, in part due to his demanding nature and famed intensity. His temperament has the tendency to grate on people and his style can be wearing.

But if the 49ers really are tired of him, it’s entirely fair to ask: are they tired of winning, too? Because those two post-Harbaugh realities might go hand in and hand in San Francisco, and that can’t be overstated. Losing Harbaugh means losing one of the best coaches in the NFL, and the guy who almost overnight returned the 49ers to relevance. To recap: San Francisco went 46-82 in the eight seasons before Harbaugh, with no winning seasons. Since Harbaugh, the 49ers are 43-16-1, with three trips to the NFC title game. What am I missing here?

Think about how Harbaugh’s first three seasons have ended in San Francisco. If Kyle Williams fields a punt cleanly, Harbaugh’s 49ers beat the New York Giants in the NFC title game and go to the Super Bowl after the 2011 season. If Colin Kaepernick completes a 4th-and-goal pass to Michael Crabtree from the 5 in New Orleans, the 2012 Super Bowl champion is San Francisco, not Baltimore. And if Seattle cornerback Richard Sherman doesn’t execute a phenomenal tip drill on that last-minute Kaepernick-to-Crabtree pass in the end zone, the 2013 49ers win another NFC championship and return to the Super Bowl.

Had those plays all gone the 49ers’ way, they might be working on the statue already and making room in Canton for Harbaugh’s bust. The 49ers under Harbaugh have come darn close to earning three rings, but his fourth season somehow still has the potential to morph into a three-ring circus, with anonymous players expressing their discontent and saying they’ve lost faith in their head coach.

Maybe they have. But it also bears mentioning what San Francisco has won in the past three years, namely two division titles, three postseason berths and five playoff victories in eight games. For comparison sake, the 49ers went just 4-6 in the playoffs in the 16 seasons (1995-2010) that preceded Harbaugh’s arrival, with three division titles, six playoff trips and one appearance in the NFC title game in that span. So lose sight of Harbaugh’s track record at your own risk, 49ers.

I don’t think the 49ers have their shiny new $1.2 billion Levi’s Stadium -- which the team broke ground on in April 2012 -- if Harbaugh doesn’t dramatically reverse their football fortunes starting in 2011. And the team, while once being the toast of San Francisco, with its five Super Bowl titles from 1981-94, had clearly fallen behind the World Series-winning Giants in terms of popularity and interest in its home market. Until Harbaugh got there.

And it’s worth recalling that not long ago, no less an authority than John Madden, who knows a little bit about coaching and winning in the Bay Area, framed Harbaugh’s 2011 turnaround season in San Francisco in historic terms. The 49ers were 6-10 in 2010, but went 13-3, losing in overtime in the NFC title game the next year

“We tend to put everyone in the Hall of Fame when they have a great game, or say everyone’s great when they do one good thing,’’ Madden told the Los Angeles Times in 2013. “I kind of think that Jim Harbaugh’s first year, by getting to the [NFC] championship game was the best coaching job in the history of the NFL.

“Just in my mind, the time that I’ve studied the game, someone had all those things stacked against him. There was a lockout, so he didn’t get to work with any of the players. He couldn’t put his program in. He had to take what was there, he had no time for free agency. And he made the best of it and got to the championship game, came that close.’’

Not that Madden’s words make it so, but they carry a little weight with me. If he thinks Harbaugh really knows what he’s doing, I might be inclined to discount the possibility that some of his players don’t like him and find his act stale at this point. If coaching in the NFL is about putting your players in position to win a ring, which is what every player says matters most, not many have recently succeeded as consistently as Harbaugh.

Your browser does not support iframes.

Your browser does not support iframes.

Winning usually stops the whining in the NFL, but apparently that’s not quite the case in San Francisco. And who said the coaching-player relationship has to be a love-fest anyway? Bill Belichick isn’t a warm and cuddly player’s coach, and Vince Lombardi largely wasn’t beloved by his Packers until his epic, record-setting work in Green Bay was done. Wanting Harbaugh gone because he’s not likable enough, or can be a jerk at times, failing to stroke the right egos in the locker room, is as short-sighted as it gets in a league where win-now has become the overriding mantra.

Chances are Harbaugh has already done his best work in San Francisco, and the marriage between him and the team he helped resurrect probably ends after this season. Unless this turns into a Super Bowl-winning season for the 49ers -- and the early 2-2 returns don’t portend that -- look for a mutual parting of the ways next January.

But I promise it’ll be easier for Harbaugh to land his next coaching job -- and he’ll have offers aplenty -- than it will be for the 49ers to find a successor who can match his record and keep the bar set as high as he did.

Be careful what you wish for, 49ers. Life with Harbaugh might be far from perfect. But life without him could be, and was, far worse.