Emulators are hard to write, but there certainly are emulators which
have seen industrial-strength use, depending on the hardware. For
instance, there are publicly available PDP-11 emulators which emulate
the CPU and peripherals well enough to boot PDP-11 Unix. And there
are businesses (and governments) using emulators in mission critical
roles, for software where the source has been lost, or it's just too
painful to rewrite.
Of course, it depends on the machine you're dealing with --- if you've
got code for some off-beat piece of hardware, you may be stuck writing
your own (which, in turn, may very well include researching
undocumented details of the machine in question --- people in Those
Days weren't often shy about using undocumented opcodes, or even
exploiting out-and-out hardware bugs).
But, a blanket statement that "emulators only work for games" is
clearly too strong.