Kirk cared noting for Starfleet regulations, the Prime Directive was a joke to him, he went ahead and did what he wanted, and damn the consequences.
If the natives were worshipping a computer disguised as a god, he would show up the computer as the fraud it was.
If the locals acted like Chicago gangsters, he would unify the gangs under one big boss, who would owe the Federation a piece of the action.
If the locals were Nazis, he would overthrow their leader and prevent a genocide.
If the locals had a fake war with another planet, he would make it a real war and then force them to make peace.
Kirk was never punished for any of these violations.