Oracle lost the lawsuit and I do agree with the decision in that APIs should be freely replicated, but let's not pretend that Google was some saint good guy here fighting the good fight, they were just cheap and aggressively capitalistic.
Legally the case was about copying declaring code from a proprietary product, not an open source one.
The implications of a judgment in favor of Oracle were staggering. Any codebase that is extensively dependent on a proprietary API is legally locked in to using that company's proprietary implementation as long as that company asserts copyright on its API. Anyone who implements the same API to offer a drop-in alternative to the proprietary product is infringing -- even if a someone privately reimplements the API without distributing the reimplementation.
Which immediately implicates WINE (Windows), Mono (.NET), ReactOS (Windows), Darling (macOS/Darwin), GNUStep (Cocoa/OpenStep), Anbox (Android), Ruffle (flash), GNU Octave (MATLAB), Mesa 3D (Direct3D), ZLUDA (CUDA), and DXVK (Direct3D 9/10/11), to name a few of the most popular...
These famous cases set the legal tone for the entire world actually.
Reimplementing an interface != stealing code.