- cat /dev/urandom (cat can't reasonably tell if you've piped to another command that expects raw binary data or a terminal that expects to be left in a sane state)
- ssh remotehost cat /dev/urandom (ditto)
- Emergency exit to avoid data loss when detecting e.g. memory corruption (lesser evil)
You're of course correct that the vastly preferred thing to do when practical is to clean up when reasonable to do so - and it's probably reasonable to do so.
- cat /dev/urandom (cat can't reasonably tell if you've piped to another command that expects raw binary data or a terminal that expects to be left in a sane state)
- ssh remotehost cat /dev/urandom (ditto)
- Emergency exit to avoid data loss when detecting e.g. memory corruption (lesser evil)
- Hardware bugs/failures erroneously emitting escape codes (memory bit flips, loose RS-232 connections)
You're of course correct that the vastly preferred thing to do when practical is to clean up when reasonable to do so - and it's probably reasonable to do so.