I think it’s more like this: Governments the US doesn’t like very much are 'illegitimate' because 'not liberal democracies'; regimes the US does like are 'important allies' or otherwise not talked about.
The whole 'not democratic' thing is more like a type of post-hoc justification for what, to many, looks like blatant imperialism. It would appear it is successful at least some of the time.