Well, that's been the case with Arab spring, Syria and Lybia: when US sees (often, mistakenly) that faction with more westernized values can take over, US supports it.
However, it is completely rational: "spreading democracy" is valid not only from idealism, but from the notion that it's much easier to deal with governments and societies that share your values. Of course, US have not always followed this motivation throughout history, but in case of islamic arab countries in the last years, US has pretty solod record in that regard.