If you look at the Matrix from the perspective of the machines, the purpose of "The One" is basically garbage collection.
The machines were basically forced, due to the nature of human psychology, to introduce logic errors into their system by allowing the human's minds to have some semblance of choice. Unfortunately, this means that the mind must be allowed to choose to reject the Matrix, if things get to that point.
However, the machines cannot simply allow their power supply to bail out whenever they want. They need to be able to control it, and Zion is that form of control. The machines known all about Zion, where it is, how many people live there, how long it has been around, etc. By giving the humans what they believe to be a way to rebel against The Matrix they are, in fact, controlling and guiding that rebellion to work exactly as they want.
Over time, however, the "accumulated errors" build up, resulting in a chain of events whereby Zion has to be destroyed -- returning The Matrix to a near-pristine state. Imaging shutting down and restarting a long-running service to clear out memory leaks, or changing the oil in your car to get rid of built-up dirt and grime.
But if they just destroyed Zion completely, they would lose their means to exert control over the humans that subsequently get dumped out of the Matrix, so they began the "prophecy of the One". They endowed one human with the capacity to control the Matrix beyond what even their own programs could do, allowed him to release 23 others, and start a city. The freed humans thought The One has rescued them from The Matrix, and spent their lives freeing other humans and taking them back to Zion, exactly as the machines wanted.
It was Neo's refusal to do what the machines wanted -- refusing to start a new Zion -- that led to the downfall of that iteration of The Matrix.