There’s a two-sided marketplace for creative works, where publishers need to get works from creators and license them to customers. They want to maximize their own profits, but they also need to make a certain amount revenue as all methods of distribution have fixed costs.
Let them eat competition.
Unless you mean specifically textbooks, which are inflating because piracy has destroyed the demand (the annual revenue of the textbook market is down ~33% since 2014, despite increases in both prices and enrollment in colleges). You can see the causal link here as increases in pricing are lagging decreasing sales. If the prices were driving the decreasing sales you would expect the opposite behavior.
https://archive.attn.com/stories/1164/heres-exactly-why-coll...
Between 1975 and 2014 college books outpaced inflation over three times.
BMW is a trademark. You can't take a Kia and put a BMW badge on it. You can, in principle, make an exact replica of a particular BMW model and put your own badge on it, and in that sense BMW doesn't have a monopoly on "BMWs" except insofar as some of the parts may be patented or (for the software) copyrighted. But that isn't an analogy, it's the original thing.
Notice what happens when you take the original thing (intellectual property) out of the equation, your statement becomes "Bayer has a monopoly on aspirin", which they don't, because the Aspirin trademark became generic and it's not under patent.
Taking intellectual property out of a conversation about intellectual property has predictably strange and totally irrelevant results. Why is that surprising?
This is the same as saying a carpenter has a monopoly on their work. They can sell it to an employer up front by the hour or afterwards as a good. But no one else can come along and take it without paying.
You can try to subdivide any particular market but you still can't get yourself out of the second half of the post: If the products were actually substitutes then the prices would approach the marginal cost. If they're not, they're not.
College textbooks are an obvious example of this. Anybody can make "math textbook" but only one of them will have the homework problems your professor will assign in them, so you need that one and the publisher has a monopoly.
Notice how your argument, if true, would defeat the point of the monopoly. If there were ten books that were all fungible with one another then each of the suppliers would want to lower prices to increase sales and you'd end up at the marginal cost, which for digital products is zero. And sometimes this even happens -- there is a lot of free-as-in-beer software, free-with-ads news websites etc. But the context of lending libraries is for when that isn't the case. You don't need to get a copy of nginx from the local library because you can get it for free from the authors.