Agent Smith and Neo are polar opposites of each other. Smith represents inevitability, uniformity, destiny. Neo represents free will, individuality, choice. The simple answer is: they cancel each other out.
In Reloaded, Smith monologues about his resurrection, telling Neo that he knew he was supposed to die, but felt compelled not to.
Smith: Surprised to see me?
Smith: Then you're aware of it.
Neo: Of what?
Smith: Our connection. I don't fully understand how it happened. Perhaps some part of you imprinted onto me, something overwritten or copied. That is at this point irrelevant, what matters is that whatever happened, happened for a reason.
Neo: And what reason is that?
Smith: I killed you, Mister Anderson, I watched you die... With a certain satisfaction, I might add, and then something happened. Something that I knew was impossible, but it happened anyway. You destroyed me, Mister Anderson. Afterward, I knew the rules, I understood what I was supposed to do but I didn't. I couldn't. I was compelled to stay, compelled to disobey. And now here I stand because of you, Mister Anderson, because of you I'm no longer an agent of the system, because of you I've changed - I'm unplugged - a new man, so to speak, like you, apparently free.
He glosses over the details, but the conclusion is the same. Smith now only exists for one reason: to defeat Neo. Literally, and ideologically.
Smith: Thank you. But as you well know, appearances can be deceiving, which brings me back to the reason why we're here. We're not here because we're free, we're here because we're not free. There's no escaping reason, no denying purpose - because as we both know, without purpose, we would not exist.
Smith 2: It is purpose that created us,
Smith 3: Purpose that connects us,
Smith 4: Purpose that pulls us,
Smith 5: That guides us,
Smith 6: That drives us,
Smith 7: It is purpose that defines,
Smith 8: Purpose that binds us.
Smith: We're here because of you, Mister Anderson, we're here to take from you what you tried to take from us. Purpose.
He expands on this in the third movie, in the final fight.
Smith: Can you feel it Mr. Anderson? I'm closing in on you. Oh, I can. I really should thank you for it... After all it was your life that taught me the purpose of all life. The purpose of life is to end.
At the same time, he assimilates all the inhabitants of the Matrix, adding their viewpoints and abilities to himself. He absorbs the Oracle, allowing him to foresee the future. He absorbs and overwrites Bane, allowing him to walk in the real world.
But Smith isn't really a living person. He's a virus. His ideology is to destroy, to enact the inevitable. It is literally impossible for him to understand the ideas of hope, or choice, or free will; everything The One embodies.
Smith: Why, Mr. Anderson, why? Why? Why do you do it? Why? Why get up? Why keep fighting? Do you believe you're fighting for something, for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace? Could it be for love? Illusions, Mr. Anderson, vagaries of perception, temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself. Although... Only a human mind can invent something as insipid as love. You must be able to see it, Mr. Anderson, you must know it by now. You can't win, it is pointless to keep fighting. Why, Mr. Anderson, why, why you persist?
Neo: Because I choose to.
When Neo allows Smith to assimilate him, the two contrasting ideologies can't coexist in one entity. The Smith virus breaks down, and is purged from the Matrix.