In my hypothetical world, the current development of humans is similar to our late 19th century in terms of technological advancements; larger countries are capable having more advanced technology than smaller towns. There is a small town located near the border of a country, which is home to some of the most notorious murderers and undesirable people (e.g. convicts, thieves, abusers) that have been exiled or otherwise ousted from their home countries. Despite the description, the town is incredibly peaceful as its residents have mostly decided to put their old lives behind. Citizens have developed their own laws, some of which contradict or overrule the country's laws. Historically, the country's ruling government has made 3 attempts of placing its own military and government officials in this town to bring it under their control. However, every time there has been an attempt, any government officials or military personnel have been openly executed or have disappeared. The government has classified this town to be "ungovernable" and avoids any interactions with said town.
Since this town is near the border of the country and has undesirable people living in it, it has been prone to attacks from neighboring countries who are seeking to expand their territory; they are under the impression that the country doesn't care for this town and is an easy territory to take over. However, that is not the case and the country still protects its territory and defends the town from invasions. While the country has been unable to place its own military in the town itself, it has placed military units in nearby towns that are capable of jumping into action in a relatively short period of time. The citizens of this town are no strangers to fighting and are capable of protecting themselves for enough time until its parent country's military is able to arrive.
What (secret?) motivation could exist for the country's government to continue protecting this town despite it seemingly being of no benefit to the country?