Our local permit office would just reject things randomly. We had one office cheerfully let us know they didn't plan to spitefully bankrupt us, and half of a two-person department became visibly angry with our general contractor when the other person in that department told us how to tie his hands and force an approval.
These shenanigans cost us rougly $500-1000 a day in insurance, interest, etc. They drug it out for about a year.
The department that decided they liked us has bankrupted multiple people on our street. We'd have at least 5-10% more houses on our street (there is plenty of room) if not for them.
California's state government has an alert on their website specifically listing various things that department did to us and pointing out they were illegal. Instead of suing, we kissed all the right asses in the right order, so now we have a house. Again, this is best case for interacting with them because they liked us, apparently.
Based on conversations with neighbors, my level of satisfaction with this planning office is roughly median for the area, but our experience was way better than average.
Marvin Heemeyer of Killdozer fame is a personal hero of mine now (Don't worrtly, I don't know how to weld. However, I do know how to make campaign donations and vote!):
https://allthatsinteresting.com/marvin-heemeyer-killdozer
Missing from that article are apparently true allegations of direct financial conflicts of interest within the zoning commission, and him being forced to sell land so that one of their cronies could develop it instead. Also note that he fought them for over a decade.
One of our state representatives is running for reelection on a plan to spend huge amounts of state/federal infrastructure money to bypass the office that likes to bankrupt people. 100's of familes will be forced off their land before the plan kicks in (assuming it passes).
So, anyway, there needs to be harsh financial consequences for just rejecting permits for the heck of it.
Ideally, promotions would be tied to correctly processing permit applications. That's probably illegal around here or something.