This is legacy built on legacy built to work with minimal CPU cycles on existing hardware designed to be compatible with hardware from the 40s.
Yes, concerns aren't separated ;)
A much more recent and far superior design can be found in Windows NT, where things like coloring are done entirely through an ioctl-equivalent (whereas Unix has amounts of in-band signaling, while some later extension use tty_ioctl).