There’s a common story in computer science that the term “bugs” in a program comes from Grace Hopper finding an insect stuck in a relay computer.  But to “get the bugs out” of a device is a very old phrase.  I found a reference of Edison using it in 1896, making a joke that was based on the fact that it was a well known phrase even at that time.  I think the origin of this saying is still unknown, and it greatly predates computer software.