Samsung is the manufacturer most capable of forking Android and telling Google to shove it, and that most of their product development has been making sure that it's possible to do so (Galaxy Store, Bixby, Tizen watches, etc.)
And that Google, knowing Samsung has the brand loyalty and wide userbase to devastate Android's market share, is in a constant effort to pay Samsung to stop pushing them away.
So they built competitors to Google's product library, and then Google pays them to push a Google product anyways, and then they build a competitor to the next Google product, and wait for the check from Google for them to shelve it... Through this back and forth, Samsung both ends up with a competitive ecosystem to Google ready-to-go if they need it, and an extremely lucrative pile of concessions from Google that Google would've preferred to not have to give them.