Piracy isn't like stealing. It's far more complicated than that. Which makes it hard to discuss, because people want a black and white "This is mine, this is not yours" line.
Piracy is closer to buying a book from a bookstore, then copying/printing the pages and giving that copy to a friend to read. The friend may or may not have ever actually bought the book. Perhaps their motives are completely irrelevant.
Currently many countries copyright laws extend to how their license, the thing they own, is distributed. In the case of the copied book, you only have permission to read the book and keep it for further readings. Many copyright owners get a bit testy when you try and copy their stuff and distribute it. They see that as their right. Copyright law, for the most part, agrees with them.
A ruling in the US made a small exception for ripping CDs to MP3s. Many take this to mean that the logic that supported that ruling can therefore be applied to all the things. That, unfortunately, is not how law works. Only ripping of cds are exempt. That and radio stations are exempt from paying artist for playing their songs on air, for very odd reasons. But that's another discussion.
The point of contention is that while the copyright owner has the only right to decide how and when their product is distributed, you copying their work has no affect on them. Or rather, it has as much affect on them as second hand sales. Are second hand-sales illegal? Absolutely not. And for good reasons that I don't have time or effort to lay out all right here.
But software companies are trying to get rid of the second-hand market as well. They see a loss in profit in the second-hand market as they could see it is just as bad as pirating to their bottom line. This is why they keep trying to push for digital downloads only, single use codes, and restricting movement of data as much as possible.
We certainly don't like that. Well, most of us don't like that. We feel we bought something, it's ours. But to them, you just bought the right to use it. for yourself. no one else.
That's why I still choose physical media as often as I can. What's the solution? who knows. But piracy is the result of the consumer wanting more control and options over their limited time and money, and "right to use but not own or sell" is the flip side of that struggle.