The story
From harmonica for the tone that activates or deactivates the device, and bug (an electronic eavesdropping device).
Etymology from Wiktionary, CC BY-SA 4.0.
Today it means: An electronic eavesdropping device (bug) that attaches to a landline telephone and is activated or deactivated by a specific tone. When activated, it prevents the telephone from ringing but activates its microphone to transmit to another telephone at a remote location. Full definition →
From harmonica for the tone that activates or deactivates the device, and bug (an electronic eavesdropping device).
Etymology from Wiktionary, CC BY-SA 4.0.