Note that the spikes point outwards and downwards
Categories
The orientation of the spikes (I was waiting outside the gate when I snapped this photo) suggests that they’re intended to prevent unauthorized ingress rather than escape.
If I really put my mind to it, I’m sure that I could find hints in dusty old microfiche newspaper archives or historical society bulletins of why in the heck most or all schools in Hong Kong are surrounded by high walls topped with spikes and/or barbed wire.