Putting aside the fact that it's funny, a lot of reason why I
like The Trouble With Tribbles comes down to it being so well plotted. David Gerrold crafted a really beautiful script where everything that happens in Reel 3 gets set-up in Reel 1, so there's a nice watertight feeling to it, there aren't any plot holes.
Just about the only thing which feels almost
like an ass-pull is Darvin being a Klingon, but even then it's neat because we already know
the Klingons want to sabotage Sherman's Planet, so it makes sense that they'd have an operative on the space station.