They got caught doing the same thing Microsoft got caught doing in the 90s with IE/Netscape -- using their monopoly position on one piece of software (Windows, the Google app suite) to prevent their OEMs from shipping another piece of software by default (Netscape, Epic Games Store) that directly competed with their own offering (Internet Explorer, Google Play Store). Since Google and Microsoft both use OEMs, unlike Apple in their parallel case, there's a clearer line to how Google is being unfair compared to how Apple is being unfair.
In short, Epic sued and won because Google got between them and Samsung.
In general, in the courts, it's a lot easier to ask a judge or jury for someone to stop doing a thing (blocking their software from being pre-installed) vs. forcing someone to do something they're not currently doing (allowing any third-party app stores).