In addition to the points made above, most nanomachines are also likely to be ridiculously vulnerable to thermal damage and radiation due to issues of scale; when atoms are measured on similar scales to your robots, highly agitated atoms or subatomic particles are basically like bowling balls in a china shop. As a practical matter in the original design, it's also easier to centralize your nanomachine swarm than to create a true decentralized network, which also has the benefit of easing control and reducing the odds of an accidental grey goo scenario (note that this, however, completely ignores the possibility of an intentional one).
But if you think about it, bacteria actually have managed to succeed in their "grey goo" scenario, apropos of Rolepgeek's point and contrary to that which was said earlier. All life on Earth is derived from basic prokaryotic life, albeit with significant evolutionary changes over the millenia, and it has spread to the most unlikely corners of the world. Life has developed to survive in tremendously acidic or basic environments, in the absence of oxygen (or for that matter, in its presence; oxygen is not a "live and let live" element by any measure), in tremendous temperatures above boiling, at pressures upwards of 100 MPa (1000 times sea level atmospheric pressure), or in water that contains significant concentrations or heavy metals ranging from copper to arsenic. It can consume solar radiation, other forms of life, subsist on one of the strongest reducing agents in the atmosphere (oxygen, which it also put there in the first place), or for more extreme conditions, examples can consume radiation or rocks. If you generalize the concept to any self-perpetuating swarm, organic life is literally the original grey goo.