The Federation is a utopia. People are at peace, no one wants for anything, most diseases have been cured, and life expectancy is way up.
So what's the problem? There's no downward pressure on population. And if population continues to grow unchecked, then eventually you start to get resource shortages, overcrowding, and perhaps even war. Then the Federation is a utopia no longer.
So Starfleet is the "safety valve" of the Federation. It's basically there to send citizens out to die. When it started, it was enough just to send the people out into space. Odds were that most of them wouldn't come back. "Disease and danger wrapped in darkness and silence", and all that.
But then a funny thing happened. Starfleet officers learned from their predecessors... and they started to not die quite so much. So Starfleet responded the only way they could... by making the ships themselves flying deathtraps. If alien microbes or angry BEMs weren't going to take out your crew, then the ship would have to damn well do it on its own. Exploding consoles are just one weapon in that arsenal.
Well, out of all the unlucky junior officers that have gotten killed by exploding consoles, at least none of them were as unlucky as alternate universe Riker getting pelted in the neck with chunks of asphalt from an exploding terminal.
Starfleet Safety Engineer #1: I don't know what to do.
Starfleet Safety Engineer #2: What's the problem?
SSE1: We've made these ships as dangerous as possible. We've fed raw plasma directly into the control consoles, and removed the surge protection. We've made sure none of the seats have safety restraints. We've convinced everyone that the best way to get around is to convert their bodies to energy and then wirelessly transmit it somewhere. We've programmed the warp core ejection systems to automatically go off-line whenever there's a problem with the warp core, and the holodeck safety systems to go off-line as soon as someone says "run program". None of our guns have safeties. We've outfitted every ship with a huge tank full of anti-matter. And the starboard power coupling is really just an old Folger's can that someone filled with marbles and wrote "power coupling" on with magic marker. And still, inexplicably, crews keep coming back from their missions mostly intact!
SSE2: Hmmm... reinforced concrete.
SSE1: What?
SSE2: Reinforced concrete. We line every control console with reinforced concrete between the plasma tap and the user interface. We say it's to provide shielding from overloads. But really, when the console explodes, there will be enough force behind it to shoot out fragments of concrete. So if the explosion itself doesn't kill them, the flying rocks will. If they fly far enough, we may even be able to take out bystanders, and people at other, unexploded, consoles!
SSE1: That makes no sense whatsoever... I love it!