We have been instructed to “appoint judges for yourselves in all of your gates”  indicating that there should be a court in every city . Why then does the verse mention the somewhat misleading “gates” (if the city has more than one “gate”) rather than cities?  Furthermore, the verse seems to imply that properly judging the nation is contingent upon having courts in every city – but why should this be the case?
One day a man complained to the Rabbi of the community of a certain wrong that his neighbour had done to him. The Rabbi heard the congregant’s story and said to him, “You are right.”
Soon the man’s neighbour came in and made a counter complaint to the Rabbi, stating his side of the story. When he concluded, the Rabbi said to him: “You are right.”
After the man left, the Rabbi’s wife, who had heard the proceedings, could not restrain herself any longer, and exclaimed with astonishment, “How in the world can they both be right? One of them surely must be wrong!”
And so, the Rabbi turned to her and replied, “Yes, yes: you are also right!”
Perhaps “all your gates” teaches us to listen carefully to all sides before reaching a firm conclusion. Indeed the phrase “bechol sha’arecha” (“all of your gates”) can also be translated as ‘all of your evaluations’. To reach a correct conclusion, all sides must first be heard and properly evaluated.
Until then, everyone must be right and not left out.
Have a really gate Shabbos,
 Devarim 16:18
 Medrash Tanchuma, Shoftim 6
 Although we do learn tangentially from the word “gates” [Sifri, Reeh 71] nonetheless in its simple context it is somewhat misleading.