If they had attempted to do their own hardware, it would have been a horrendously uphill battle against the phones in the market at the time (Apple had tiny share, Nokia colossal).
Putting out the OS meant that hardware manufacturers could compete with different features whilst still (theoretically) having a common OS that users could mostly navigate around and app developers could write for. Contrast this with Nokia at the time, where S40 etc. worked wildly differently on different phones, with different JSRs supported by the J2ME runtimes on each phone, and where they essentially competed with their own other Nokia phones for specs; Nokia did a massive range of phones that were mostly the same but looked different or had very mild changes - it was too much choice!
This way Google could carry on doing software and leave the hardware to external companies that were used to doing hardware. I still have my TMobile G1 though, for history's sake. Don't use it though - it practically has no RAM left over after boot.
Windows and Office have locked users in for many years. But hardware cannot. Many years ago I was a Dell user, then I am now a Mac user. A few years back I was Nokia and then Sony Ericson and then Samsung, Motorola and now Apple. I think Google made a smart move to only make very limited hardware product on their own.
Sure they got lots of other companies to do the expensive hardware R&D, manufacture and marketing, but in the end, what's a multi-billion dollar market in devices is still just a funnel into line-of-business #1.