It’s called “defensive design” and this video explains why cities use it.