In the old days, Unix rescue boot floppy disk to fix workstations or servers only included minimal text editors such as ed (i think vi was added later). So if you were a Unix admin or power user, you need to know ed to fix the dam system. The 'ed' text editor was available everywhere. These days rescue disks boot from USB or CD/DVD-ROM and may have a full desktops or operating systems running. A little bit of history, I guess. BTW, I prefer https://www.system-rescue.org/ these days to fix Linux bare metals.
Though in most cases, you can just type “reset” to reset your terminal to a sane state. If the problem is not the terminal’s state, but how software is trying to talk to it, setting TERM=vt100 (with a “reset” for good measure afterwards) usually works for most if not all terminals nowadays.
Love the books by mwl. Have physical copies of several of them, and the whole bunch of the ebook versions. Currently reading one of the physical copies. The one about Ed I have in ebook format only and didn’t read it yet. Will get to that one after I finish reading the physical books that I have from him.
The POSIX standard defines ed as one of the editors that must be present for a system to be standard complaint, the other being vi I believe. You can always expect ed to be available to you on a Unix system.
It is true that all certified Unix systems follows POSIX, but it doesn't mean that non-certified systems are forbidden to follow POSIX. Most Linux distributions have ways to turn to 98% compliant, and BSDs have always strive to follow POSIX.