Obama probably wanted a failed coup and instigated one.
Erdogan will make Turkey more Islamic than Iraq if he wins this.
If this coup succeeds, the US will recognize the new government even though it has not gained power by democratic means. At that point, it will be more obvious that the US approves.