There may have been some connection between king Pedro and queen Estefânia. King Pedro's mother was queen Maria II, and her first husband was Charles of Leuchtenberg (de Beauharnais). Queen Estefânia's maternal grandmother was Stéphanie de Beauharnais, married to Karl Ludwig, grand duke of Baden. Charles was the son of Napoleon's stepson Eugène, and Stéphanie, who was a relative of Eugène's (not very close, I think, second cousins or something like that) was adopted by Napoleon and one of her titles was Imperial Highness.
If the Portuguese royal family still maintained close relations with their Leuchtenberg (Beauharnais) relatives, that could be a little hint to why Pedro and Estefânia got matched. I admit it's somewhat far-fetched, but it's the only thing I could come up with. :-/