Where it all went south
In Episode I, the obvious bad guy, Emperor Palpatine, who would become Darth Sidious later on, issued a “Wipe them out, all of them” order to all of his henchmen. The order was pretty direct: if you see them, get rid of them. “Wipe them out” doesn’t usually mean take people hostage, does it?

Well, the army of droids either didn’t get the message, or their programming is out of whack. Near the end of the movie, they had clearly beaten the Gungans on the battlefield. Then, they decided to ignore Palpatine’s orders and take them all hostage. Loophole, Mr. Lucas?