That's "sham-wah" you illiterate Yanks
It prevents chafing, pads the sit-bones, wicks sweat and keeps a gent's tackle in place.
Not needed for short rides, as everyone else has said, but damn fine for all rides and pretty much mandatory if you're spending a decent amount of time in the saddle.
In order of importance, they come below gloves but above special shoes.