> How?
In general the same way they get ~every Android phone to ship with Google Play.
The most aggressive way would be to design their own chips like Apple does and put the drivers in the kernel tree, make the chips available to other phone makers and then require satisfactory open source drivers from everyone as a condition of using Google services. Qualcomm publishes the drivers or loses all their hardware customers to Google's chips.
> How is Samsung different than the rest?
Qualcomm has been a near monopoly. The next phone you buy will likely be one of theirs even if you're dissatisfied with the existing one, so they can screw you and still get your business.
Samsung is the underdog here, and hardware brand loyalty is weak. If they could sell more phones by giving the people what they want, their overall sales go up even if people keep them longer, because the latter is more at the expense of their competitors.