Are police in schools to protect against violence or to deal with petty classroom drama by forcefully arresting students?

Sources:
Witness to rough South Carolina high school arrest: ‘I couldn’t believe this was happening’
SC sheriff fires deputy who slammed black student in classroom
Video of arrest – https://youtu.be/LDXuJYjWbUQ/
Video of arrest – https://youtu.be/mNsxdCV-zAw/