if this was the case though why wouldn't they just keep the OS for themselves then?
Money. HP didn't want to invest trillions of dollars in the platform. Open sourcing allows smaller developers and manufactures to put work into the platform and use it for whatever purpose you wish. This is not only the cheapest option, but the best. WebOS can grow so rapidly now. And HP seems committed this time, which is good.