Duterte is the elected President of the Philippines. The Philippines is an important US ally in the Pacific and Duterte seems willing to ditch the alliance, so some playing up to him is in order.
Remember, Turkey has been a key US ally through several military governments. The US got along with the Greek military dictatorship.
I thought that we were past the time when the US selected the leadership for other countries.