Okay, so Hidan's role is honestly pretty straightforward but also super specific in how it functions. He's not a strategist or a leader like Pain, and he's definitely not collecting intel like Itachi or Kisame. His entire thing is being the group's frontline zealot and unkillable damage sponge. He rushes in, tanks hits thanks to his immortality jutsu, and uses that voodoo-doll-style ritual to curse his opponents to death. It's a brutal, close-range, attrition-based fighting style that forces enemies to deal with him, which creates openings for his partner, Kakuzu, to work.
I always saw his pairing with Kakuzu as the key to understanding his purpose. Kakuzu needed a partner he couldn't accidentally kill, and Hidan's immortality made him perfect for that. They're like a messed-up business partnership; Kakuzu handles the finances and long-range attacks, Hidan handles the messy, up-close 'collection' work through sheer, fanatical persistence. He's the blunt instrument, the one who enjoys the act of killing for his 'god' Jashin in a way the others don't. While others have grand world-altering goals, Hidan's motivation is purely ritualistic and personal, which makes him a wild card even within the Akatsuki.
In a meta sense, he exists to show a different kind of 'power' in the ninja world—one based on a cursed, almost supernatural faith rather than chakra mastery or bloodline limits. He's also there to raise the stakes in fights; knowing an enemy literally can't be killed by conventional means changes the dynamic completely. His defeat required a specific tactical solution (burying him alive) rather than overpowering him, which was a neat narrative choice.