Sometimes marketing matters...
IMHO Palm made a big mistake to rename PalmOS to webOS (yes, the latter was a newer OS with little resemblance to the former). Many user didn't understand it - and thought "webOS" needed to be continually connected to work (something alike what ChromeOS would have been later), in a time when mobile internet was still expensive. It also wasn't compatible with the large catalog of PalmOS apps available. Also releasing both Windows and webOS models didn't make user sure where the future was (in neither, we now know).
Anyway Android could watch Apple and copy, having little legacy, and Google could afford to give development tools away for free, especially since they were already free stuff Google reused at its own advantage.
When MS rebooted Windows Mobile, it was already too late.