I find it interesting that people always say, Öh the royal families are inbred"and yet the only example they can quote of where this was a problem is that of poor Charles Habsburg, who lived several centuries ago.
I'm going to both agree and disagree with you on this one - hear me out.
Royal families are inbred. There is a long history of relatively close cousins marrying other relatively close cousins in just about every European royal family - if not all of them outright. Even look at the current Queen of England - she married her 3rd (I believe) cousin, and they're both descended from Queen Victoria, a woman who married her first cousin. QEII is also descended from the KGV/Mary of Teck union, which was another pair of cousins marrying. Inbreeding happens.
What don't actually see, or don't frequently see, is genetic disasters caused by inbreeding - the reasoning being that there is typically enough diversity and the actual cousins marrying isn't as close or as frequent as people tend to believe. There is even the rather regular introduction of fresh genetics periodically, to keep the gene pool diverse. The problem with the Habsburgs wasn't that there were cousins marrying cousins, it was that there were so many cousins marrying cousins (and I believe even aunts/uncles marrying nephews/nieces). You don't get Charles Habsburg just because two cousins married, you get it because a whole bunch of cousins married.
The problem that houses that require dynastic marriages, such as the Brazilian Imperial Family, is at risk of facing is that bunch of cousins. The Brits have a history of royals marrying cousins, but they also have a history of royals marrying not related royals, and royals marrying members of the aristocracy, and royals marrying commoners (okay, the last one is newer, but even before they started marrying the commoners they were still screwing them). This keeps the gene pool fresher.
To go back to the original discussion that started this all, the best argument that I think has been put forth in favour of dynastic marriages in the Brazilian Imperial family is simply that it's tradition. I'm not convinced that it's necessary to maintain an imperial family - not all former ruling houses maintain dynastic marriages in the 21at century, but the members of them are, in my opinion at least, as royal as the Brazilian family, plus making marriage and inheritance complicated can fracture the family and endanger it in the long run - nor do I believe that it's done for the good of the country. Tradition, however, has a degree of sense to it - once again, here me out here.
The rules regarding a succession are law, and as such can only be changed by changing the law. If a house is no longer in power they no longer have the ability to set the law, and therefore they have no grounds upon which to change the rules governing the line of succession. As such, the rules regarding the succession essentially have to be preserved as they were at the time of the family's disposition.
This is why the Stuarts are able to make a claim to the British throne - because at the time James II was overthrown the laws requiring the heir to the British throne to be a descendant of Sophia of Hanover and not a Catholic didn't exist. It's also why Puren's claim to the Chinese throne is disputable, or why the future of the claim to the Romanian throne can be disputed, or why the Russian throne has two pretenders. The Brazilian Imperial family - and other deposed families - has to maintain dynastic marriages in order to maintain a claim to the throne, because dynastic marriages were the rule when the family sat on the throne.
In contrast, houses currently in power have the ability to change the rules and laws surrounding their succession. QEII can have the succession changed in order to allow elder daughters to inherit before younger sons because she's in power. Other houses can abolish, or at least alter, Salic law because they're still in power. The Brazilians don't have that luxury, however, and are rather stuck with what is an archaic system.