Google has in excess of $121 billion of cash (& equivalents), net of total debt.
Big rich companies take on debt for reasons that are sometimes inscrutable from the outside. Recently, they have been borrowing for ~5%, about a half point above what the US government gets for 10-year Treasuries.
Apple has been financing operations with debt for a number of years as part of a complex optimization plan.
No, Google is not broke.