As far as the limits of my fragile memory go, I don't believe I've illegally obtained a PC video game. Maybe I did ages ago and forgot, who knows.
Now consoles, those are a little different. Thing about console games is that they tend to stop being sold firsthand after some time. Take the DS library for example, I would have to expend effort tracking down second hand sellers and probably pay a largely varying amount of money for the privilege. No thanks, I will take my
downloads and be content. Not like any publisher or developer would see that money anyway so what is the point?
Even the 3DS library, except that one carries the exception of still being available in digital form. That one is mostly laziness: for reasons never made clear to me Nintendo removed the ability to pay using a card on the European eShop. That was odd, and incredibly frustrating.
Back in the day I did make my own legitimate backups of the various 3ds games I owned physically, for conveniences sake. Anything new gets downloaded because I have passed the point of caring about paying for that system. I already give extortionate amounts to Nintendo for overpriced Switch games so what does it matter.
If my Switch were able to be hacked I think I would still buy some games for it. The ones that really hold my attention enough to uphold the hefty cost they carry these days. There are however some that I would relish in being able to play without that worry. These games would likely not have been purchased anyway.
Am I committing software piracy? Very likely. Does it bother me? No, because I keep it under control enough for my own morales to be happy with the choice.
And I think thats the most important part, if you are content with whatever you are doing in full knowledge of how it might (Or in most cases, might not) affect the creators then by all means keep at it. Just don't be a dick.