3rd party games don't cost Microsoft that much money to host, because the bulk of them don't hit the service day of. By the time they hit Gamepass, 6 months or so after release usually, they've made 90% of the money they'll make over the course of their shelf-life. Microsoft is basically paying a percentage of a reduced price game to host them, and selling publishers on the idea that getting the games into players hands will build the audience interest for the next release. More people are likely to try a game they are unsure of as part of a $15 monthly fee than they are to take a chance on a $60 game they're not sure they'll like, afterall.
Think of Netflix. Netflix originals hit the service first obviously, but almost everything else has to go through theaters and some time at retail before it's available for stream. In that way, these catalogs are less about getting every new game the minute its available to consume, and more about having a catalog of games you haven't tried or haven't managed to get to yet, waiting, for a relatively low cost.
That's true, there's always a percentage of people who cancel, or just take advantage of deals. But there's a large percentage that stay too. And the more content you have for them, the more they stick around.
So accruing more content is a good move for Microsoft.