One plot element that tends to get glossed over is Kirk showing up at a privately owned planet and threatening to kill Flint unless he hands over the rytalen.
"Beaming down to the planet, Kirk, McCoy, and Spock are attacked by a hovering robot. An old man, Flint, arrives to halt the robot's attack, but insists that the landing party leave at once. Kirk asks Flint to reconsider but Flint still refuses. As a result, Kirk orders the Enterprise to lock phasers onto their coordinates. When the situation seems completely hopeless, Flint gives Kirk two hours to obtain the ryetalyn."
Apparently Starfleet can show up and take whatever the want to from a privately owned planet, or at least Kirk seems to think so. The planet and everything on it belongs to Flint. He was well within his rights to refuse. He only gave in at gunpoint.