Consider the 2011 Concacaf Gold Cup and Copa America, both just completed.
Each had 12 teams, broken into three preliminary groups of four. The top two from each group advanced. As the groups are called A, B and C, let's call these six teams A1, A2, B1, B2, C1 and C2. The top two third place teams also advanced; let's call these T1 and T2.
Now how should the quarterfinals be structured? Well, a logical breakdown could be:
A1 v T1
B1 v C2
C1 v T2
A2 v B2
The key factor here is separation. The two weakest teams, the third places, are put in different halves. The first-place teams are kept apart as long as possible. And teams that met in the group stage are also kept apart when possible.
Now let's take a look at how the tournaments were actually drawm, Gold Cup on the left, Copa on the right:
Gold Cup Copa
A1 v T1 A1 v T1
A2 v B2 A2 v C2
B1 v C2 B1 v T2
C1 v T2 C1 v B2
At first glance, these look pretty reasonable. But each of them violates one rule. Teams that met in the group stages are not kept apart as long as possible. Note how A1 and A2 can have a rematch in the semifinals, as can C1 and C2 in the Gold Cup and B1 and B2 in the Copa.
Why did the organizers go for these structures? Here's a hint. In the Gold Cup, Mexico was in group A, and the United States was in Group C. In the Copa, Argentina was in Group A and Brazil in Group B.
The answer is that organizers desperately wanted their marquee teams to meet in the final, preliminary results be damned. There was always a danger that the United States, say, would lose to Panama and wind up being C2 instead of C1. But this bastard structure still keeps the Americans away from Mexico until the final. Indeed, that is what happened. Panama gained little from its upset win, since it had to play the U.S. again in the semi. The U.S. won the rematch, and the dream final with Mexico was successfully engineered.
In the Copa, the teams the organizers hoped to match in the finals were Brazil and Argentina. Sure enough, one of them faltered; Argentina finished only second in its group, but as A2 it still avoided mighty Brazil, B1.
Compare this with the women's World Cup, which had a fair A1 v B2, C1 v D2 /// B1 v A2, D1 v C2 structure. So when the United States fell to second in its group, it found itself in the other half of the bracket, playing Brazil in the quarterfinals.
As for the Copa, hilariously, both Brazil and Argentina lost their quarterfinals, leaving organizers with the challenge of selling semifinals featuring Uruguay, Paraguay, Peru and Venezuela.
Sometimes, sport wins.