Occupation by whom? Does this have any purpose other than annoying China?
Occupation by anyone; from an employee gone nuts to an assault external to the compound. Embassies around the world have detachments. Most countries operate this way in order to protect classified/sensitive information within their facilities.
As an example the British, French, Russian, Chinese, Venezuelan, Cuban, et. al., have military detachments at their missions at the U.N. for the same purpose.
I get the feeling this is new information to you?
“Does this have any purpose other than annoying China?”
As if annoying China isn’t a pretty good reason unto itself.