Yeah, they were illegally distributing Google's copyrighted source code this entire time. It's just easier to prove the trademark thing, so Google lead off with that.
Redistribution of copyright protected material requires authorization of the right holder. Code (or programs compiled from code), usually fall under this rule.
(In the US) hoster privilege usually allows them to not be liable unless they know about a specific infraction. In some jurisdictions some platforms (such as youtube) are required to monitor uploads proactively for known copyright violations.