It happens because the treadmill electronics are cheap poorly made crap (no matter the price you paid) that spews Radio Frequency Interference and/or general Electro-Magnetic Interference (RFI & EMI) that the USB-powered speaker is picking up.
If the speaker is wireless, it might be picking up RFI, but the simple route to speaker buzz is EMI at audible frequencies being picked up by poorly shielded audio amplifier input sections (whether their signal is wired or decoded from a radio-frequency wireless signal.)
Computers generally have sufficient input filtering on their power supplies that vague fears of crappy treadmills damaging them are unfounded, but commonly reinforced by salespersons of accessory devices. You could certainly try plugging the treadmill in to a different circuit, or relocating it away from the computer/speaker. A typical surge suppressor will probably make little difference, as they only affect higher than usual voltages, not odd frequencies at typical voltages. You'd need an actual filter (capacitor and/or inductor - both is common, sold as a unit) to impact what's going into the power line, and shielding (grounded metal) to impact what's being broadcast directly from the machine, not over the powerline.
A better speaker might solve the perceived problem by not picking up the interference (via having better shielding built into it.)