The one thing the machines couldn’t control was human emotion. It’s too chaotic to predict/calculate/understand fully. It presented them is a chaotic process that was out of their control. The architect knew it, but he couldn’t get it right. Ultimately, the machines had to listen to Neo, which still didn’t make any sense.
The writing for the Matrix was all over the place though. The first one was flawless. But the second and third had so many plot holes and inconsistencies. Nevertheless, I still enjoy the concept of the movies.