The monarchs here been very useful:
1. Pedro I declared our independence, and later helped Portugal with some crap and became known there as Pedro the Liberator.
2. Pedro II believed in technology, half of all railways in Brazil was built during his reign, he installed the second telephone in the world in Brazil (the first was obviously, Graham Bell`s one), built a research centre in the same place that produced awesome results (it is not heavily celebrated as launching rockets but most of the food production from Brazil, including exported things, are stuff developed by them at some point) and heavily defended that the education level should rise as whole. Also he, ironically, strengthened a lot Brazillian democracy, he himself believed monarchy to be useless and left basically voluntarily.
Brazil immediately after the coup derailed, the first republic was basically a crappy military dictatorship disguised as republic, it ended with another guy stealing the "throne" and becoming dictator himself, then a period of actual republic voting but with lots of instability and flirting with both fascists and communists, then another dictatorship, and now we have a republic where there were more failed to finish the rule than successes (1 president died, before taking power even, 2 were deposed, and only 2 actually got elected and finished their time in power)
The reason monarhy works, in principle, is because the monarch has to think long term, he can't fuck up the country or his heirs will be screwed. Of course there are always someone that go off rails but this apply to any system of government.
The advantage of democracy, in theory, is that there is less violence to choose who is the next ruler... That said our current president was stabbed during elections, a former president was in prison for a while, and politicians here have a knack of having very weird deaths in inopportune moments...
EDIT: I realized I should explain why Pedro I became Pedro the Liberator: Portugal was basically conquered by someone wanting to return Portugal to absolute rule, with the monarch having all the power. Pedro I despite starting with a heavy disvantage managed to free Portugal from the absolutists and put in power a Liberal government.