Many have noted this policy thrust and wondered if it is random or if there is a reason for it. I don't claim to know what (or indeed whether) they are thinking in the White House and the State Department.
However I have a guess about the underlying motive. My guess is simply an extension of the feelings Michelle Obama shared with us in a moment of ill-advised candor: "For the first time in my adult lifetime I am proud of my country." (source: ABC News here)
Perhaps, like his wife, Obama is so contemptuous, so ashamed of all prior U.S. presidential administrations that he rejects out of hand any nation that had the poor judgment to be our ally during those administrations. That would explain being rude to our former allies and friendly to our former enemies. Perhaps he thinks our enemies were correct in opposing the U.S. as it then was, that they showed good judgment where our allies did not. Sad, if true.