The City takes its power not from any law or constitution but from the fact that nobody knows from whence it came. The City is older than England. It is older than the English language even- nobody knows its age and for this reason nobody has the right to interfere with its ancient freedoms.
There are stories of course. Some more credible than others. Some even claim supernatural forces at work and swift destruction on all who would harm it.
Despite this, and despite the Harry Potter air of theatre about the place (always on the verge of the ridiculous) it shares its secrets willingly to those with the imagination to believe them.