A tournament draw looks like chance and is mostly arithmetic. Pots and placement restrictions determine most of the outcome before any ball is drawn.
Pots exist to spread strength
Teams are ranked and divided into pots, with the strongest in the first, the next in the second and so on. One team from each pot goes into each group.
The result is that no group contains two of the highest-ranked teams, which is the whole purpose. An unseeded draw would regularly produce one group far harder than the rest.
Ranking is done by a published system, usually a rating formula or competition results, so the seeding cannot be adjusted by discretion.
Confederation restrictions are the second constraint
Rules typically prevent two teams from the same continental confederation being drawn together, with an exception for the confederation holding the most places.
The reasoning is that qualifying already tested those teams against each other. A group stage repeating those matches offers less to the tournament.
Where an exception exists it is limited, usually to one same-confederation pairing per group.
Restrictions make the draw sequential
Because each placement changes what is legal for the remaining teams, the draw must be conducted in a fixed order with the software checking validity at every step.
Sometimes only one group remains legal for a team, and the ceremony simply announces it. That is not a fix, it is the arithmetic closing.
Organisers run the constraints in advance to confirm a valid complete draw exists for every possible sequence, since a dead end mid-ceremony would be unrecoverable.
Hosts and travel add further conditions
Host nations are usually placed in a predetermined group and position so that their fixtures are known and can be scheduled in suitable venues.
In tournaments spread across large distances, additional rules limit how far a group's teams must travel between matches.
Each such condition reduces randomness further, which is a trade the organiser accepts in exchange for a workable schedule.
The ceremony is a compliance exercise
Drawing in public with independent observers exists to demonstrate that the constrained process was followed, not to introduce genuine unpredictability.
The verifiable part is that no team was placed outside what the published rules permitted. That is what the audience is actually being shown.
Understanding a draw as a constrained assignment rather than a lottery explains why certain groups feel inevitable and why complaints about them are usually complaints about the seeding formula.

