Why didn't Google buy Sun when Sun was looking for a buyer? Google based its operating system on a patent-encumbered language like Java. They had licensing issues with Sun around Java even before Oracle bought them. Why didn't they buy Sun?
The fact is that Oracle can make much more money from Sun aquisition than Google ever could. And part of that moneymaking include suing everyone else.