Costco does not test the battery; they trust their customers. Costco moves a lotta product; that's their game.So why would they replace it during the warranty period if it tests good?
If someone wanted to swap out their battery just before warranty expired, they could.
Are there people who feel justified in doing so? Sure there are. You and I pay for them.