How does the Prime Directive fit into this? On the surface, it seems incompatible with an imperialistic Federation. But remember that the Prime Directive only applies to planets which are at a much lower level of technological development than the Federation itself. That is, only to planets that are not wealthy enough to be worth the cost of occupying and taxing. Star Fleet Command wants to prevent glory-seeking captains like Kirk from taking over underdeveloped worlds that are likely to drain more revenue than they bring in. The Prime Directive serves this goal, while also cloaking Federation imperialism in a veneer of righteousness that has been all too successful in fooling generations of TV viewers.