The term 'bug' was first used by Grace Hopper on September 9th, 1945 when a real bug, a moth, short-circuited an early computer. The operators of the computer said they had "debugged" the computer, and ever since then the terms has not changed.
This question has spawned a number of urban myths.