Sure, you could just execute someone, but an established feature of the Forgotten Realms is it is a world of Good and Evil, not real world pragmatism. The Lords Alliance cannot "just execute" criminals, because that would be Evil. Ergo, prisons to contain adventurers are a necessity.
Simply not true I'm afraid.
Waterdeep executes people all the time - just check out its
legal code. None of those corrupt and self-interested Lords' Alliance cities is remotely shy about executing/maiming people AFAIK. If you have evidence of them being big wimps all of a sudden, I'd love to hear it, but it'd have to be a 4E/5E change. The laws are the same as in 2E, note, just arranged/presented differently, and "murder of a citizen without justification" is, as explained in the more detailed 2E account, extremely broad (self-defence is not necessarily "justification" IIRC).
(As an aside, the major cities/city-states in the Lords' Alliance are:
Baldur's Gate - canonically corrupt as hell, money rules, a council of the wealthy uses famously greedy bully-boy mercenaries to push people around. That's not an exaggeration, note, that's just canon. Let's not even get into when they were literally conquistadors.
Elturel - Been all over the road, but always has something fundamentally messed-up going on, whether it's corruption, brutal puritan authoritarianism (seriously - they were dragging people to work the mines for life for swearing), or being dragged to hell.
Iriaebor - Canonically "Waterdeep but way worse" - super corrupt. Real sword and sorcery/Fritz Leiber vibes. Frequently heavily infiltrated/run by the Zhentarim.
Mirabar - I don't know much about Mirabar - fine maybe?
Neverwinter -
Used to be a good-guy city, like genuinely, currently (in 5E) ruled by a "despot" enforcing "heavy-handed laws", so there's another one!
Silverymoon - Maybe still a good-guy city? If so the only one in the Lords' Alliance. I don't see any obvious problems, though I hear the orgies the ruler throws are legendary (thanks Ed Greenwood, we definitely needed to know that!).
Waterdeep - An orderly and brutal city where power rules and nothing else matters much. It is quite historical that non-citizens get treated poorly, at least.
So anyway, point is, there ain't "good guy" cities - these are mostly "greedy merchant"-run cities, with Silverymoon (and previously Neverwinter) kind of an odd fit with the rest. The idea that they're totally cool and only ever jail people who aren't political prisoners or the like is obviously laughable.)
Is it evil? If the only way to stop someone from killing again, and you can use things like zone of truth to get an honest answer on that question, I'd debate that philosophy.
You'd get an honest answer, but it wouldn't
necessarily be a useful one, because many malefactors would honestly believe themselves blameless or that they were only doing stuff for a specific reason. Zone of truth just makes them tell what they believe is the truth, not spit forth words of wisdom from the gods. It's also temporally bound - what a person says on one day may not be the truth to them on another day. It's useful to some extent for establishing facts, perhaps, but even then I'd question it because people being truthful are often factually wrong - as we're all aware with how incredibly unreliable and inaccurate witness perceptions are in court cases. I've been on a few juries and that certainly (sadly) seemed to hold true. It's more of a narrative convenience to sidestep the need for interrogation scenes etc.
The "heroes never kill" is golden age comic book morality. In many cases, it's really stupid* and the primary reason for it is so that the bad guy can escape and be a menace in the future so the stories don't have to come up with more supervillains. Which is what I tell my players - my D&D world can be a harsh place where the only solution is a permanent one. We aren't talking thieves who otherwise don't harm anyone or smugglers here, we're talking about villains that have taken many innocent lives and will continue to do so unless stopped.
I think this is kind of conflating three separate things. Golden age stuff is usually that the hero has a good reason to kill them emotionally but doesn't to show their heroism, and where there's a narratively convenient way to imprison the person in question. Whereas executing prisoners who have been captured and stand no real/significant chance of escape (which even in the FR, is going to be upwards of 95% of people being executed, based on what can get you executed in say, Waterdeep) is much more easy to argue is "Evil". But realistically most adventurers are acting entirely extrajudicially and don't even have jails they could drag prisoners back to, and further, with adventurers, the most dangerous beings they're dealing with are very often massively capable of escape. I mean, what we're going to jail a Beholder? A red dragon? A level 10+ Wizard? Doesn't how much I might value justice reform IRL, that's obviously impractical.
I have to say, I really don't like "adventurers as cops" (I know you aren't suggesting that) unless that's the whole deal. Fundamentally adventurers aren't cops. They're almost the opposite of cops - they're usually acting entirely outside the law, y'know, like outlaws!