The Mayor is the Mayor specifically of Hobbitton and is an elected position with a seven year term. Mayoral duties seem to consist primarily in “presiding at banquets”, but presumably if there’s any actual city administration to do, that would be the Mayor’s job as well. Frodo in his brief stint as Mayor defunded the police.
So the police are interesting because you’ve got two sorts of groups? The Bounders were border guards, so their jurisdiction presumably covers the whole Shire. And then the Shirrifs I believe were the local Hobbiton constabulary before Lotho co-opted/expanded them into his own private army. If I am recalling correctly, their authority/presence really only begins oncr they cross the Water into Hobbiton proper.
The Master of Buckland is both the head of the Brandybuck family and a political position. Buckland was established/colonized by the Brandybucks - they’re not just extremely rich, they literally carved out their own little sociopolitical domain arguably external to the Shire itself. So again, the Master of Buckland is not just a very rich person with a big house and lots of family members, he’s the governor of a semi-sovereign state. This is demonstrably different from the Bagginses, who, among other things, don’t all live together. But this is part of why Lotho’s takeover is anomalous. He’s just a Rich Guy, not a political authority.
But we are given a third political authority, who is: the Thain of the Shire. Nominally, at least, the Shire as a whole is ruled by a Thain. (Does the Thain have authority over Buckland? I am sure this is something Merry and Pippin have different opinions about). And we know this is a Thing because, re: Lotho, there’s a line to the effect that if anyone is making a power grab it should be “the right Thain of the Shire, and not some upstart.”
Paladin Took is not just a Rich Guy (as Lotho is), he is not just the head of the Tooks and the leader/ruler of Great Smials, he is the Thain of the Shire, the closest/only example of Hobbit nobility as such. I mean, nobody cares per se, but that’s just what Hobbits are like.
So Pippin is Ernil i Perrianath not because he’s some rich kid/landed gentry who wandered into a high fantasy setting by mistake (though he is also that), he’s literally the Prince of the Halflings because he is the heir to the Thain of the Shire. Pippin is 100% technically a prince, it’s just that absolutely no one cares.
If I had to speculate wildly, I would say this all comes down to Bandobras. The Thainship was probably established as a way to recognize the Bullroarer’s heroism repelling the goblin invasion during the Long Winter. That’s why it’s passed along the Took line. When you knock off a rival king’s head (RIP Golfimbul) you get to be king now, it’s only fair. And of course for Tolkien kingship means service and being a protector of your people, so that’s what the Thain of the Shire is for. It just doesn’t come up much, and so the Thain typically stays in his own lane. The Bounders were probably established at the same time and for the same purpose. Why do you employ people to walk around the borders of your country and drink free beer? To see if wolves are invading across the frozen rivers again. The Bounders probably report to the Thain in the event that there’s anything to report. There just never is.
tl;dr: Pippin is a prince because his father is the Thain, and this is different from just being a Took.