Investigating the mystery of Flint is the only way for Kirk to access the medicine, though. And spending time with Rayna is the only way to investigate the mystery of Flint.
Direct action is out of the question, as Flint and his robots significantly outgun the landing party, and even the starship. Asking direct questions gets the heroes nowhere. But playing a waltz and dancing to it results in our heroes finally getting some results...
That's at the very heart of what's so endearing about TOS. Our heroes are frequently confronted by the utterly absurd, yet they tackle it as if it were the most natural thing in the universe, fighting absurdity with absurdity. And they do it while managing to pretend it's not camp!