The cure could be worse than the disease if the nanites you programmed to say, search and destroy HIV virus cells, malfunctions, and starts searching for and destroying something else as well.
There is also the issue of getting them out of the body, so that they aren't an unhealthy variable that can go somewhere and cause trouble later on.
Nanites are just as capable of wreaking havoc on the body as fixing or maintaining it.
My worst nightmare on the subject is some crazy idiot programming a hoard to take apart anything in sight at the subatomic level, and using them as a terror weapon. Worst case scenario in my mind involves someone brilliant, but insane, working for some terrorist group, they are released, they do as they are programmed with great alacrity, and spread like a mechanical plague. How do you fight something like that? The only answer I can think of is making and programming nanites to destroy the other nanites.
They did that in the very first Cody Banks movie, and the bad guy gets a cube of ice shoved in his mouth containing these nanites and they eat him. Only we never see if they shut off as they start eating the evil guys base.. I assumed the explosions and fire killed them off.
Yeah, that is the latter, having nanites used as a terror weapon. Our poor bad guy would've felt like he was being eaten from the inside out, and would've felt every singe cut and bite that the nanites made.
A nasty way to go. Even he probably didn't deserve it.
Those nanites were non programmed and "free range" kind of, originally they were supposed to be preset to eat waste and metal like oil and scraps..