It's easy. Nanomachines are like magic fairy dust. Once you realize just how very much story can be replaced by a simple drop of the word "nanomachines", it's easy to see why a science-fiction author would rely on it for all those tricky logistical questions. Even if it cheapens the story and causes the audience to roll their eyes, it's no worse than the explanations given by fantasy stories and many other popular series.
Raiden: "Why Won't You Die?!"
Senator Armstrong: "Nanomachines, son!"
The substructure of the universe regresses infinitely towards smaller and smaller components. Behind atoms we find electrons, and behind electrons quarks. Each layer unraveled reveals new secrets, but also new mysteries.
— Academician Prokhor Zakharov, "For I Have Tasted The Fruit," Sid Meierís Alpha Centauri
Already we have turned all of our critical industries, all of our material resources, over to these... things... these lumps of silver and paste we call nanorobots. And now we propose to teach them intelligence? What, pray tell, will we do when these little homunculi awaken one day and announce that they have no further need of us?
— Sister Miriam Godwinson, Sid Meierís Alpha Centauri
Shego: "Nano"? (laughing) What's "nano"?
Dr. Drakken: Nano. Tiny. Mini.
Shego: Why don't you just say "mini", then?
Dr. Drakken: Because "nano"... sounds about a hundred times better! That's why.
This is an artifact of nanotechnology, the science of small things. These are assemblers: Powerful, computerized engines, each just a dusting of atoms wide. One alone can begin building an object from nothing up, one atom at a time. Millions of assemblers could sit unnoticed in the crevices of your hands. Billions of them could build a plane from the ruins of a tank and a few handfuls of dirt within hours. The untold trillions in the Adaptive Cruiser's creation reactor will create new weapons and vehicles from what the scavengers bring back... within seconds.
— Narrator, Hostile Waters: Antaeus Rising
For this next test, we put nanoparticles in the gel. In layman's terms, that's a billion little gizmos that are gonna travel into your bloodstream and pump experimental genes and RNA molecules and so forth into your tumors. Now, maybe you don't have any tumors. Well, don't worry - if you sat on a folding chair in the lobby, and weren't wearing lead underpants, we took care of that too.
— Cave Johnson, CEO of Aperture Science, Portal 2
Nanomites! Perfect little soldiers!
—Dr. Macullen, G.I. Joe: The Rise of Cobra
Grow the nanobots up
Grow them in the cracks in the sidewalk
Wind the nanobots up
Wind them up and wish them away
—They Might Be Giants, "Nanobots"