So I had this issue where I was moving web apps between hosting plans. As they were all transferred, I wondered why it refused to delete them with this error message.
After a few click left and right and a lot of wasted time, I found this blog post that provides a script to help you debug and the exact explanation as to why it doesn’t work.
To make things quick, it’s all about “Deployment Slots”. Among other things, they have their own serverFarm setting and they will not change when you change their parents in Powershell (haven’t tried by the portal).
Here’s a copy of the script from Harikharan Krishnaraju for future references: