Kirk's "five year mission" could have represented a change to the standard Starfleet policies when it came to ship deployments. In addition to normal starship activities, Kirk might have had a mandate to (when possible) engage in more exploration than was then normal. And to actively seek out first contact situations, which previous interpretations of the prime directive would have discouraged.
If the federation had been basically static in term of size for years and decades, an increased emphasis on exploration could have reflected a political change within the federation council to be more expansionistic, seek out more members and more territory. Access to potential colony worlds and new resources.
Rewriting and reinterpreting the prime directive could follow a perception that a earlier version was excessively restrictive. Kirk (and others) would be allowed to contact "primitive" cultures under some circumstances.
The changes in policies might have come also from the federation becoming more curious as a coverall culture than they had been.
Perhaps the "five year mission" was a pilot program.