It's total pay without benefits. It includes overtime and on-call time (which are typically paid at a higher rate).
It wouldn't surprise me that an experienced security guard is making $170K; the state itself is expensive, and they have to retain staff. The staff is often ex-cop, and guards very frequently work overtime (paid time-and-a-half or more). The guard may be a people manager (I don't know which row you're referring to but it looks like the typical guard makes far less).
A lot of campuses have actual police. In some ways campuses are similar to a municipality and have many of the services that entails (fire, trash, water, power, snow removal, parks, and security/law enforcement).
You could similarly ask why a town of 50,000 people needs a police department.
When you put it in terms of total number of people...it does make sense. A lot of universities down here in Texas have a small town+ amount of students and faculty and they tend to have their own police departments and other services.
My university had a police department because it is, as one might expect of a flagship state university, an enormous landmass with billions of dollars in infrastructure and equipment, plus about 6,000 full-time residents living in university-owned housing. Residents of a certain class of people who are prone to doing stupid, illegal shit.