*Sigh* If you refer to one of my previous posts, you may note that I present a very different interpretation of events in 'Spectre Of The Gun'. I also think I make a fair-ish case for certain eps ('The Apple" , 'Return Of The Archons') not being full-on PD violations, since there were things involved that could deliberately BRING DOWN frackin' starships.
In general, I attribute a lot of .... stuff that happened in TOS to lazy/rushed writing, and trying to satisfactorily squeeze all of it into the exact same continuity hasn't happened yet, nor is it ever likely to. All things considered, it may have been much better if the PD was originally phrased (and maintained) as a SOP rather than a Biblical Commandment, but there ya go.
I choose to take the Federation at face value - a very optimistic vision of the future. If people wish to label it Expansionist Imperialist or socialist or a metaphor for sex or whatever, that is fine - but it doesn't do a thing for me.