I'd say the fact that the Portuguese regime moved to Brazil itself, while the Spanish one remained divided, beset and weak a couple thousand miles away, certainly had something to do with it. Besides, at the time, the enormous Amazonian hinterland (as well as the plateau which today houses Brasília, Goiânia and other major population centers) of Brazil was less a possession and more -- far more -- a claim, effective control only being exercized on the coastal Portuguese cities with the interior still largely untouched and in the possession of the many aboriginal tribes. So it being "under control" of the government in Rio was no more true before the Napoleonic Wars than it was directly afterwards.
But it's not something I know particularly much of. The above is conjecture and someone with more knowledge of the matter might have to correct me on it.
Bookmarks