A "bug" in the context that it was originally used is by @Shyju is a minor illness. People often refer to cases of influenza that are not life threatening and leave no long term consequences to one's health as a "bug". "I would love to attend your function tonight, but I have the flu bug and would hate to give it to everyone else so I'll have to stay home instead."
In general people want to rid themselves of the "bug" when they are ill.