We've established Mario's looking for an easy buck and doesn't give a damn who he screws over, and also he's got a hell of an in with the royals that makes him virtually bulletproof. So what more could he do to ruin this poor kingdom? Oh, I dunno, maybe ROB IT BLIND?
Why the entire wealth of the nation is jammed in bricks and floating around creepy dungeons is unknown. Maybe Koopa tried to hide some of it in bricks, assuming no one would be crazy enough to go around punching them all. Maybe some of them were left in the castles because the Toadstool family were like Scrooge McDuck and liked rubbing up against gold coins wherever they went. It doesn't matter. What matters is Mario collects all of the gold for himself and shows no intention of ever giving it back.
How do we know he's not giving it back? Well, every time Mario gets 100 of them, he gets another life. There are a few possibilities as to what this actually means, but there is a likely one: Mario is buying his immortality from some sort of omnipotent being, who laughs in the face of the natural order of life and death. Mario is literally trading the wealth of a kingdom for additional "lives" that make him effectively immortal, so long as he continues bankrupting the kingdom he's supposedly out to protect.
Let's make this clear: there is really no good option for the Mushroom Kingdom. They're either being ruled by the Toadstool family or by self-proclaimed "King" Koopa. Both of their options are an oppressive monarchy. Really - no one's up for democracy at all. So - it shouldn't really matter that Mario's trying to re-instate one ruling monarchic family over another, right?
Wrong. The Toadstools are the evil ones. Hear me out: all we know about Koopa is that he very recently took over the kingdom - so recently that it's very unlikely he was able to build any castles himself. So - what we're left with is the reality that - in all likelihood - it was the Princess' family who built those lava-filled, nightmare castles. It would also explain how secret pipes were installed in all of them, seemingly without Koopa's knowledge, and why Koopa stands atop a bridge that can be instantly destroyed simply by touching an axe. If Koopa had built these castles, odds are he wouldn't have made his favorite bridges instant deathtraps.
Beyond that - Koopa has the will of the people behind him. His supporters number in the thousands! The people supporting the Princess includes two destructive, piss-poor plumbers and some mushroom-headed weirdos who hang out in horror-castles.