part of a particular device, then I can see why they allowed that. But if it’s written well, it doesn’t mean the software is a valid patent outside of the device. Many devices do need specific embedded software to operate and they control specific functions of the device, MRIs, Cat scanners, etc, such as computer controlled manufacturing equipment come to my mind in this regards.
As I said if it’s written right I could build a stand alone fax, copier, scanner, printer with embedded software and patent the lot. BUT, if someone else takes the code and adjusts it to control a robotic arm you put on your desk to hold and move your monitor, then it is NOT a breach of the patent as it’s NOT doing the function the patented device is doing. Current patent laws allow this sort of use in a very different area stuff.