The other† purpose is to keep countries and people in check. The mere ability to immediately use firearms is enough to stop a lot of possible troublemakers.
A country keeps armed forces: military and border guard to keep external actors in check, police to keep unruly citizens in check. A private person keeps arms to keep in check potential burglars, assailants etc., and any other actor who could come in force, of which there are some historical examples discussed in other posts.
† aside of the sporting, hunting and collector activities.