As for buying a company for just one product, again I'm gonna speculate, but look at the PeopleSoft and BEA purchases. PeopleSoft was something like $10 billion (short scale), and BEA was like $8 bil. Plus Oracle already had a robust app and middleware business on top of Java before those purchases. If another company could take control of Java and act in a way that would make it harder for Oracle's existing business, we're talking about losing profits across several business units. Not only would Oracle's stock fall from the loss of profitability, but also from loss of confidence in Oracle's decision-making because of how much Oracle had already spent on Java business. Still, $7.5 bil or w/e it was that Oracle spent on Sun is a lot of money, which is why I mention the other top things that Oracle got out of the purchase besides protecting their Java businesses. The hardware division, for example, enabled Oracle to sell a complete solution where they own everything top to bottom: the hardware, the OS, and the software that runs on that. That's nice, on paper. Looks like Oracle's fucking it up top to bottom as well, but hey, Oracle is Oracle.
The above also applies to why they couldn't just develop their own. They had too much already invested in Java business, plus how the hell would their own solution ever see the same kind of market adoption that Java already had?
Anyway, I don't really hate Oracle. I think they're bad for FOSS, no doubt, but I admire the fact that everything they do, not just to FOSS but even with the big stuff like rejecting SAP's settlement offer just so they could drag SAP's and HP's officers onto the witness stand, supports the notion that they really, really don't care about PR or corporate image. Every year, Oracle seems to find a new way to say, "We don't care what the rest of the world thinks of us, it's our business and we're gonna do whatever we want." In a world of corporate gloss-over bullshit, it's actually refreshing to find a company that huge that is so openly brutal and uncaring.
But yeah, they're definitely bad for FOSS.