Why is ALTER faster than UPDATE (for full table rewrites)?
Both do rather different things under the hood.
ALTER TABLE takes an exclusive lock on the table and rewrites it. The manual:

The rewriting forms of ALTER TABLE are not MVCC-safe. After a table
rewrite, the table will appear empty to concurrent transactions, if
they are using a snapshot taken before the rewrite occurred. See
Section 13.5 for more details.

UPDATE only takes a write lock on affected rows (all in this case) and adds new row versions to the table, roughly doubling its physical size (unless it can reuse dead space). Concurrent readers can proceed happily.
Table-rewriting forms of ALTER TABLE do not write to the WAL. UPDATE, OTOH, also has to write to the WAL first. That's also why UNLOGGED tables can UPDATE in roughly half the time: no WAL by definition.
The fiddle demonstrates some effective differences:
db&lt;&gt;fiddle here