Microsoft has a NDA for Game Pass details, but what I have been able to gather is it seems like MS pays them an up front fee and then potentially some amount per download. It has seemingly been profitable for Square Enix as they have put out almost every single one of their games onto GP after 2 or 3 months of release.