In Star Wars: The Phantom Menace, why did Obi-Wan and Qui-Gon take a detour to Otoh Gunga?
Shouldn't they have gone directly to Theed, the capital city?
Traveling to Otoh Gunga seemed a good choice at the time for a few reasons;
Qui-Gon and Obi-Wan managed to escape the Nemoidian ship but they must know that it's only a matter of time until their absence is noted and the forces on the planet are alerted to their likely presence. Their most immediate need is to simply disappear from view, forcing the searchers to spread outward from the landing sites and thus improving their chances of slipping through the droid lines.
The droid landing craft came down thousands of miles away from their ultimate destination, Theed. As a minimum they'll need to find out where the heck they are, to locate transport and possibly supplies for the journey ahead. A city would seem an excellent place to find take their bearings, literally and figuratively.
Qui-Gon is well aware of Naboo's geopolitical situation. One of his key aims is to prevent the droid army from occupying the planet and to that end he and Obi-Wan are keen to speak to the Gungan leadership, both to warn them of the dangers posed by the Trade Federation's troops and also to convince them of the need to support the Naboobians militarily.
The Jedi place great stock in allowing the Force to lead them into advantageous (and highly coincidental) circumstances. When Qui-Gon rescues a local, who then offers to take them somewhere that meets their two most obvious needs, this seems like the sort of providence that Force users are trained to look out for.
From the opening crawl:
In the first scenes up to the arrival on Naboo:
After arriving in Otoh Gunga and meeting the Gungan High Council:
The above sequence of events from the two Jedi's perspective shows us why they chose to divert their course to Otoh Gunga as opposed to heading straight for Theed. Qui-Gon Jinn decided that the Royal Naboo must be warned of the hitherto unknown droid army that is imminently invading Naboo. Arriving on Naboo via one of the invading landers, it is clear that the Trade Federation's army will outpace the Jedi. After learning of the existence of the Gungan city, Qui-Gon Jinn heads there instead in hopes of finding from the natives a means to directly warn the Royal Naboo, or failing which, at least securing a transport with which he stands a better chance of arriving in Theed before the Trade Federation invaders.