Nine hundred years ago, in the middle of the Shining Crusade, Iomedae, personally responsible by writ of the Emperor of Taldor for administration of the territories she was halfway through conquering, set up Her inquisition.
It wasn't the first thing She set up, obviously. The first thing She set up was the military courts and military administration, which functioned from the earliest days of the Crusade, and then the civilian courts and civilian administration, once there was sufficient free territory for them to administer, and then a diplomatic service and a spy service, which by the time She ascended was unsurpassed even by Taldor and Qadira. It's a powerful thing, for a spy service, to have adventurers from all over the world have served for decades in your Crusade and been converted to Your worship.
After all of that She set up Her inquisition. The problem was that due to corruption and enemy action, sometimes some of the other branches of Her government might fail to discharge their duties, and someone would have to get to the bottom of it. Those personally chosen by Her, obviously, would be chosen for not being corrupt, but She couldn't choose the entire administrative apparatus of a sizable and wealthy state, and She wasn't kidding herself about whether any mechanism beyond 'personally chosen by Iomedae or Aroden' would suffice to prevent corruption or infiltration.
Inquisitions are, well, often Evil. This is in part a self-fulfilling prophecy. Most of the Good churches don't have inquisitions because of their distinct tendency towards Evil. So it's mostly Neutral churches, and they don't care much that the Inquisitions are mostly Evil. Pharasma has an inquisition, which roots out the undead and Urgathoa cultists and those who scheme towards undeath; Abadar has one, that focuses near-exclusively on bribery and corruption. There's an organized collaboration against Rovagug cultists. And past that it was down to regionalisms. Some fae-touched places have an anti-fae inquisition, some places with shapeshifters have an antishapeshifter inquisition, places with a possession problem tend to have an inquisition right on its heels, Sarkoris bans all arcane spellcasting, that kind of thing. Nidal has an inquisition. That those kinds of inquisitions turn out Evil would surprise no one.
Iomedae, in the characteristic fashion of Iomedae, decided as a mortal that Her Church was going to have an inquisition and that She would simply set it up to not be Evil. Her inquisitors would be familiar with the concept of tradeoffs, and understand Law not as a series of procedures to follow while torturing confessions out of people but as one of Iomedae's invaluable strategic assets which they should die rather than squander. They would be charged with spending the trust of Her people in Her state only very carefully and at great need. They would not do harm unnecessary for their work. If they needed to mindread people to check for external possession or control, they'd check only for that, and let people go otherwise even if they were murderers, so the state not grow into one that exercises control through mindreading in cases it wouldn't have regarded as worth it in advance. Lastwall would have few laws, all of them worth enforcing; it would not be true that an ordinary person had anything to fear from the inquisition, and in fact in training they'd interrogate ordinary people for calibration, and get more training if they thought those were a threat.
She wanted an inquisition such that people who committed a serious crime could turn themselves in and cooperate and correctly expect this to have been in their own interests, where, having been successfully blackmailed once, it is not in someone's interests to despairingly give in to being blackmailed twice but to go explain everything. She wanted an inquisition that functioned because the people of the world deserved a Lastwall that was Lawful Good, and therefore that was itself Lawful Good.
And She suspected that Her church would be a great danger to Evil everywhere on Golarion, and would in fact need to be extremely robust against infiltration by Evil gods and their servants working - with more power than Her - quite hard at misdirecting and undermining Her hands and Her eyes in the world. So it wasn't, in fact, sufficient for it to be Good, it had to also be good at its job.
They make extensive use of Marks of Justice. Those are, unlike human justice, impartial; the trigger conditions are set when the spell is cast, and go into effect when they are met, whatever anyone thinks about it, however convenient or inconvenient. Lastwall's leadership will be trustworthy not just through Iomedae's potential direct intervention but through magic enforcement of its standards; this not only saves Iomedae on intervention budget, but allows for the same standards imposed on those who are not Her divinely chosen agents. Every time they rely on Iomedae, their answer comes at the cost of losses somewhere else for their cause; they will carry Her banner as far as they are able without calling on Her for aid.
Iomedae's first inquisitors all trained under Her personally, and future inquisitors had to do six months' shadowing of three different senior inquisitors, to make sure they'd get a sense not just of procedure but of the range of possible deviations from it, and that if some of the senior inquisitors were doing it terribly wrong they'd have a basis for comparison with which to identify the error, and in the course of the training they are repeatedly presented with apparent evidence of corruption in the highest echelons of Iomedae's church, and fail if they either dismiss or or report it to someone who would obviously be in on it if the evidence were real.
Iomedae's inquisition isn't Evil. It is pretty ruthless. This was once less true; in the runup to the Age of Glory, as Lastwall trained and prepared to be the sword with which Aroden could strike at Nidal, and at Geb, and at whatever other horrors opposed the arrival of a new age, Iomedae's inquisition evaluated most tradeoffs as favoring not doing a lot of dubious things that'd be unnecessary and embarrassing to the Church in the light of a new day.
But the Age of Glory did not come, and what came instead was mass starvation and mass war and a rift in the world and Asmodeus clawing His way into power in Cheliax and thereby into influence across all of Avistan. Lastwall is desperate, and its inquisitors make different tradeoffs. They do not torture people, because that is Evil and doesn't work; they do, if there are no spells on hand with which to do it more gently, beat them unconscious so they'll be unable to resist spells cast on them. They don't execute people who they know or suspect they're sending to Hell, if there's the option of petrifying them instead, but this is less a mercy and more a matter of reducing Hell's information access. They follow the rules Iomedae wrote, some of them because they understand and share Her vision, some of them because they understand 'invaluable strategic asset', some of them because Inquisitors tend to be rule-following sorts of people. But they are not, really, an institution of which one can expect any mercy that isn't in the rules, and they are also very very busy, and taught to act on their best guess when they're out of time even if it isn't very certain.
And so the headquarters of the Iomedaean inquisition, in the present day, are a grim, windowless, underground, Forbiddanced, Mage's Private Sanctum'd building in which prisoners receive three fifteen-minute visits from an elderly retired member of the Church each day, because Iomedae thought that solitary confinement was inhumane, and are well fed and healed if sick or injured and have access to recreational activities and the opportunity to report misconduct by their guards, and are not tortured and are encouraged to seek atonement - in which the guards are subject to Marks of Justice that ensure prisoners will not be mistreated, in which the cells are clean and dry -
- and where they will, from the moment they enter until the moment they die, encounter no one who loves them or mourns for them or instinctively desires the good for them. Because it wasn't really possible to make a rule about that.
Iomedae, once the goddess of victory, is the goddess of triage, in these days, and She has higher priorities.