Sounds like sloppy writing on the part of the writers. I'm guessing the story involves something stupid like having the alleged perp be someone who would be entitled to diplomatic immunity if they entered the country on official business, but since they entered on their own private business they don't get to claim immunity. But who would believe such a cockamamie story? However, please tell me the idiot writers didn't succumb to stereotyping and make the villain an arrogant Frenchman.
There's actually two people in question, initially one is let go but the prosecutor points out to a judge the other can be held because he is actually Taiwanese and therefore not the son of a diplomat of a recognized country and not subject to diplomatic immunity. The other is a Dutch citizen but the prosecutor gets him to talk (turns out he wasn't actually guilty but was aware of the other one) by pointing out that he dropped a class this semester, thus reducing him to 8 credits at the university he went to, therefore he is no longer a full time student and doesn't inherit his parents' diplomatic immunity.
The protagonist though is actually the defense attorney for the Taiwanese man, with them trying to prove the Dutchman was actually guilty and at first the prosecutor looking like a power tripping jerk. That the Taiwanese guy turns out to be guilty after all is a bit of a twist (though it's definitely not the first time the show did the "this particular prosecutor who often comes across as a power tripping jerk is right and the innocent-looking client is guilty after all" twist).