Presumably because, in popular legend, the walls of the city of Troy were constructed in such a confusing and complex way that any enemy who entered would be unable to find his way out.
Troy town (plural Troy towns)