A car's function is transportation. A gun's is to kill.
It depends on your interpretation.
To some, the gun's a part of a hobby. For sport, getting fresh meat from your sport, or for target shooting. Sportwise, you'll need to be able to score a killing hit on your game; otherwise the game's going to go on maimed, so there's a level of skill required there. Reloading's also popular, as is either building or modifying them (IDK how that works, but I've had friends show me what they called "custom mods." Not being familiar with the jargon, I just nodded politely to keep the convo going).
For others, its simply a tool used to discourage home invaders, or neutralize them if needs be. You could substitute neutralize for killing here and you wouldn't be far off.
Then there's the use you see it put to in inner city violence, or in the traffic stop where the guy's girlfriend livestreamed him dying: murder.
edit: Please don't take this as an attack of any kind, or an insinuation that you're afraid of guns.
So there's really multiple uses. Same as for a car; transportation, sport, or murder for those hit and runs.