One of the most prominent questions Software Testers have in their mind is “Why does software have bugs?” The most common reason is human mistakes in software design and coding.
A bug is a flaw or glitch in a system.
It’s like the Leaning Tower of Pisa, which looked straight enough for the first five years, but began to lean when a bug in the original design became clear. The foundations were only three meters deep, in soil that was notoriously weak and unstable.
Unfortunately most software bugs don’t turn into lucrative tourist attractions.

The first case of a bug beign found was when the team at Harvard University discovered that their computer the Mark II, was delivering consistent errors. When they opened the computer’s hardware, they found … a moth. The trapped insect had disrupted the electronics of the computer.

Grace Hopper coined the term bug to refer to unexplained computer failures.
Hopper is best known for her trailblazing contributions to computer programming, software development and the design and implementation of programming languages. A maverick and an innovator, she enjoyed long and influential careers in the U.S Navy and the computer industry.