Question: Assume this city is relatively large by late medieval standards, around 200,000 people. The city is mainly a site for trade due to its geographically central position and being on a river. Also, because it is geographically central, it also means the city is important for the government to project power.

**What might be the benefits for this same government to sanction certain crime within this important trade city?**

Crime that would be considered legal within city limits ranges from murder, burglary, trade of illicit substances, and racketeering. This is all under the condition that the crime does not directly affect the government's activities.

Answer: 
Nonsense. If something is allowed by the law, then it is not a crime. The very definition of a crime is breaking the law.

The proper question would be why the law in this city is more lenient than elsewhere. Consider for example the US, which is probably the country with the most legally heterogeneous country in the world. In some places you can walk around with an assault rifle or drive a tank. Do it in other places and it's jail for you. Why? Because different places have different populations with different world views, and the government at federal level does not want or cannot interfere.
Some governments [pork barrel](https://en.wikipedia.org/wiki/Pork_barrel): they favor the electorates that voted for them with money for projects that will benefit those communities - better roads, park lands, new hospital or extension to an existing one, etc.

There is also an element of divide and conquer. If the communities are competing with each other there will be less focus on the government.

A government that encouraged crime in one area would not do so openly. By encouraging such a situation, the government would openly give the perception of tackling the crime. By doing so, the people will have less of a focus on what the government is doing in other areas, such a corruption and kleptocracy. It also gives the government a better chance of staying in power.

One way to unite a people to align with the government is for the government to create common enemy. The criminals in the crime zone would be one such "enemy".