You assume Mudd was willingly collaborating with the klingons.
Mudd thinks he's willingly collaborating. On this particular issue, I believe him.
There is nothing in the episode to support this theory. Quite the opposite actually, this guy seemed genuine frightened by the prospect of being chosen by Lorca and Tyler.
Of course he did. NOT acting frightened would have raised uncomfortable questions, yes? Like "Why do you not seem even a little bit worried about us choosing you?"
It's more realistic he was a fellow inmate, who broke earlier than the trained military personal, and traded his little "bug" against "not being tortured this time".
First of all, if we were talking about anyone but Harry Mudd, this would ALMOST be a believable theory. But this IS Harry Mudd, so it's a foregone conclusion that the
very first thing he did when they arrested him was try to make a deal. When you look up "Enlightened self interest" in the dictionary, you see a picture of Harry Mudd with his terrible hat and three mail order brides standing behind him.
Second of all, WHY exactly would the Klingons have tortured him? He's a civilian, he clearly doesn't know anything worth telling, and even if he did... again, he's HARRY FUCKING MUDD, he'd tell them anything they wanted to know in exchange for a ham sandwich.
Mudd tipped his hand early on talking to Lorca: "I'm like you. I'm a survivor." Which means he literally does whatever he has to do to survive, and will sell out anyone, lie to anyone, steal from anyone, cheat anyone, and make any deal he has to in order to avoid trouble for himself. He is probably the only person on the ship the Klingons HAVEN'T tortured.
Mudd is not evil. He is a selfish, arrogant, poor douchebag soul trapped in a situation way beyond his capabilities. Nothing to deserve death and torture for
Of course not. Violating Klingon space is what earned him the death and torture (he was legitimately arrested for that, remember?) But again, this is Harry Mudd we're talking about; avoiding punishment for his crimes is kind of his thing.
Even though we know he will be able to swindle his way out of all of this (this IS a prequel after all), leaving him behind was unnecessary cruel.
It was certainly cruel (Lorca's a jerkass like that) but you're getting rightly skewered on the "unnecessary" part. Picard or Janeway would have given some sort of heartfelt and moralizing "I'm sorry, but I can't take that chance" and then had a heart to heart with their first officer later about whether or not this was the right thing to do. Lorca, by contrast, is all "fuck that guy, he told on me"