The Walled City of Kowloon in Hong Kong was an accident of history. No-one was sure who had jurisdiction over this area as it was on the border between China and Hong Kong, which until a decade ago was administered by Britain. So police and the authorities turned a blind eye to what was happening - except when bribes were on offer.
Over a decade or two, multi-story illegal building on a large scale led to a 3 dimensional rabbit warren of darkness and squalor, with limited and unauthorised water supply, electricity and sewerage. Gangs, crime, drugs, prostitution and protection rackets grew and thrived.