It's an arbitrary but common one used in SQL Server. If the example used 128, you'd ask "why 128?" If it was 64, 50, 100, or any other number, you'd still ask. What is the right number? String lengths should come from business rules and the data domain but, when those don't exist (or someone is creating a fake table just to show an example), they borrow from other examples or existing schemas. It's clearly not the point of the article to come up with the absolute best and universally satisfying table design for orders.
As a sibling comment said, optimizing for size. However, since in ut8mb4 (the standard for Postgres, and modern MySQL) each char may take up to 4 bytes to store, the updated version of this would be VARCHAR(63).
If you can guarantee you’ll only store ASCII, you can safely use 255.
This is also probably a premature optimization for practically anyone to be fair. Even at 1 billion rows, you’ve only added 1 GiB of overhead, and at that scale that’s a small percentage of the overall size.