If Star Wars was the least bit realistic, all warfare would be done by droids. You wouldn’t put a organic being with imperfect reflexes into the cockpit of a fighter and send them to take out an artificial planetoid and sacrifice their life needlessly if you have the technology to build a robot fighter equipped with a strong AI which isn’t limited by the flaws that flesh is heir to.
In the Prequels there actually was an entire army of droids and fighter-ships with droid or AI pilots. But the movies insist that cloned humans are superior somehow. The excuse is that organic/biological beings are better at thinking creatively which gives them some sort of advantage in combat - a pretty dubious proposition.
I guess Jedi pilots might actually be superior to an AI in some cases. Even the best AI can only probabilistically try to predict the future, but a Jedi has actual, supernatural precognition.