Delhi's not really a state. It's a city that looks pretty much like a state, behaves pretty much like a state but has powers short of a state. The Constitution's 74th Amendment Act gave Delhi an Assembly with the power to make laws with respect to all matters that other State Legislatures have the power to make laws for except public order, police, land and offence, jurisdiction of courts and fees, with respect to public order, police and land.
It also gave Delhi a Council of Ministers headed by the Chief Minister who are appointed by the President of India who hold office at his pleasure but are collectively responsible to the Assembly of Delhi. To sum it all up, unlike other states, Delhi has a Chief Minister appointed by the President of India instead of the Governor and does not have control over it's police services. The control over the Delhi Police remains with the Ministry of Home Affairs headed by the central government.
The Union Territories at the time of Independence were areas that did not have provincial governments established by British India or have working democratically elected government by the princely states that later became a part of India shortly after Independence. The central government retained control over them and over time, they were eventually put on a path to statehood. Places like Goa and Sikkim, that joined India after the Constitution started out as Union Territories and eventually gained full statehood within the Constitution.
Some Union Territories hardly have any representational government at all. For example, the Andaman and Nicobar Islands has only a Pradesh Council and is administered by a deputy commissioner. Daman and Diu is administered only by bureaucrats.
Puducherry and Delhi being are populous and have partial statehood which is why we have curious situations like Arvind Kejriwal and Manish Sisodia who keep getting into confrontations with the Delhi Police. The law only requires that the government give prior sanction before a public servant can be prosecuted but does not require that there be a prior sanction before they be detained in the event they are becoming a public order problem. Which is why chief ministers seldom get detained elsewhere. They rarely advise their Governors to detain themselves or members of their own cabinets. Usually an outgoing chief minister is detained by an incoming administration. One only need look at Tamil Nadu to see how this machinery plays out.
On the ground however, this is it plays out: If a chief minister and a law minister of Union Territory are in the opinion that the police, which is controlled by the central government, is causing a law and order problem, they can be temporarily and legally detained and then let go — so long as they are not formally charged with an offence.
This allows Kejriwal to make a nuisance of himself by placing himself in situations where his arrest on public order grounds is almost inevitable. As it was yesterday. Amid the commotion that was happening outside the Lady Hardinge Hospital in New Delhi, it was evident that the presence of politicians would only add to the already charged atmosphere. If he wanted to meet the family of the victim, he could have waited till things calmed down or paid a more discreet visit and the Delhi police played right into his hands.
This little quirk in Delhi's legal status allowed for Kejriwal and the government to both be embarrassed.