Why do places have cameras?

1) is it to ensure staff are working?
2) is it to protect staff from crazys?
3) is it to ensure that noone (staff and customers) steals anything?
4) is it to match bookings to faces?
5) is it just for general surveillance?
6) how long do you think they keep footage for?

Just curious haha