Presumably, the machine wasn’t adequately sanitized after each use.
I think, anyway.
I’m a rube who knows nothing about medical thingys. But your remark that the equipment may not have been sterilized properly makes the little light bulb go off in my noggin about taking a test during a physical to determine the breathing capacity of your lungs where you blow as hard as you can into a tube and the results register on a graph. Could there possibly be residual mucous left in the tubing (not the mouthpiece, which is presumably changed out with each patient) which could blow back to the next patient? I wonder how much we take for granted which would scare us silly if we really knew the risks.