In some of the news reports on this, I saw repeated references to the fact that "webOS can scale" or something to that effect. I don't know too much about webOS vs. Android vs. Chrome, but my guess here is that HP is buying Palm for tablets and MIDs, not for smartphones. I doubt HP has much desire to go against the HTCs and Samsungs of the smartphone world in hardware, and they're not naturally a software company (a la Google and Microsoft with their respective mobile OSs).
More likely, I would bet, is that HP has doubts that Android will scale well to tablets (current offerings in the market notwithstanding), with their relatively higher computing power than phones, and their experience with the Slate is probably indicating that Windows 7, despite being a good desktop OS, is not scaling too well down to the netbook level and below. Thus, they might be leaving open the option of pushing a tablet/MID level of computers based on webOS to compete with the iPad on iPhone OS.
And, if that doesn't work, as others have said, Palm has both a valuable name and lots of talented employees that can become HP's mobile arm, thus allowing them to have their asses covered and prevent shareholder panic.