Hiring the staff and handling the lawsuit - Google has their own in-house law firm anyways - has likely worked out to be cheaper for them than buying Sun Microsystems would have been.
Yes, but the downside on a lawsuit if Oracle prevails will be much worse.
Imagine, if you will, all that Sun IP in the hands of Google instead of Oracle. ZFS might have gotten a license friendlier to Linux, Solaris could have stayed open source, and I would put money on Google having spun Java out into a completely open foundation that wouldn't have done what Oracle has done with new EE versions.