I'm not defending this, but that's not really a fair analogy. It's more like "the gym already gave you a keycard, why should they cancel your access just because you stopped paying for the membership?"
To extend the strained analogy, they do let you finish the month (of printing pages). The complaint here is more “my keycard barcode is still legible, but it stopped working at the end of the month”.
I'd consider that more analogous to what HP did if they made you send back all of your old cartridges, but they don't. HP doesn't treat the cartridges like you're renting them, and doesn't care about getting them back, just that you can't use them anymore.
The gym is selling access to the equipment and HP is selling access to the printer. Both the keycard and the ink cartridge are tools provided to allow you to use your access. Neither require you to return the tool providing you access after you cancel.