Under US law (I see someone else posted about EU law):
Physical property has a long tradition of legal rights that are a part of ownership. There's a thing called "right of first sale" that means you have the right to sell an object that you own. This legal framework falls under property law, even if the media on the disc is also governed by copyright law. In this case, property law is inviolate - it trumps copyright law.
Digital files are instead governed only by copyright law. Further, media companies could not modify copyright law fast enough to keep up with the digital revolution, so more than copyright, digital files are controlled by digital rights management (DRM) code, and contract law (the long TOS when you access a service or site).
The contract law in the TOS, and code in the DRM, do two things: they force a digital file owner to treat it as a "license," and give media company the ability to severely restrict use after the purchase.
So basically, when you buy a disc, you are simply getting a lot more rights to use that content. You literally own the copy.
This is why media companies are doing everything that they can to switch customers over to streaming services and stop selling physical content. It's also why it's a literal lie when you are told you can "buy" digital copies that have DRM, because those companies will simultaneously charge you the higher "purchase" price and deny you ownership rights as if you bought a disc.