A ROM, or more technically, a ROM Image is a computer file which contains a copy of the data from a read-only memory chip, often from a video game cartridge, a computer's firmware, or from an arcade game's main board.
This is how most emulators work. You connect a calculator you own to the computer, and create a ROM from it. You then load the ROM into the emulator and can use the emulator exactly like your normal calculator. Now, the ROM contains information such as the operating system, memory addresses, and other data. Skilled programmers can change the data inside ROM Images to alter how things function. The OS 2.42 was originally made for the TI-Nspire, and somebody made a ROM of it. Somehow, this ROM got leaked (sharing ROM Images is technically illegal in most jurisdictions as it violates DMCA). Then, a user modified the ROM to emulate a TI-84+ and extracted the OS from the ROM. This is where the 2.42 8xu file came from. This means that the 2.42 8xu is technically a hacked operating system thereby being extremely unstable especially since it was written originally for the Nspire.
So what I meant by OS 2.42 being an illegal ROM was that the origin of the OS was a ROM Image that was illegally shared, and modified.
If I really wanted I could download OS 2.42 and use a Z80 disassembler to view the original assembly, make modifications, reassemble it, and send it to my own calculator. Although this is possible, it is not recommended since most people have no idea what they are doing when it comes to making OS Modifications. This can cause permanent bugs or glitches within the system, or do nothing. It all really depends on the code.
Edit: Snippet of the decompiled OS 2.42