Why is an error or a defect called a bug?
The legend goes that the first digital computer, ENIAC, was having a malfunction. Lt. Grace Hopper, looking in the hardware components, found a moth trapped in the boards. “Oh, it’s just a bug.” However, The New Hacker’s Dictionary [Eric Raymond, Second Edition, MIT Press, (1994)] states that the term was used prior to that event. Even so, the legendary moth is now reputed to be property of the Smithsonian Institute.