The occ allocates exercise notices to clearing-members at random across their short open interest. Each firm then allocates internally, either randomly or by a documented method such as first in, first out.
The takeaway for a trader is that assignment is not personal and not predictable. You cannot avoid it by being late to the position, and you cannot infer anything about the market from receiving one.
Example: 10,000 XYZ $50 calls are exercised against 80,000 of open-interest. Roughly one short contract in eight is assigned. If you are short 16, expect around two, but you might get zero or all sixteen. Size positions so that full assignment is survivable rather than merely unlikely.
Related: assignment, occ, clearing-member, early-assignment