Long ago, I was behind the scenes in one of the world's larger libraries of ancient stone tablets. Lots of the tablets were receipts for financial transactions. But I don't think a single one of them showed the price of a stone narrative fiction book. So I won't speculate there.
There's no law against a company pricing based on costs of inputs, and a few probably do. But I'm pretty sure the vast majority of them, publishers and otherwise, price not on cost, but on what the market will bear.
An iPad has lower cost of materials than a desktop PC. Apple charges not based on those costs, but on what the market will bear. That market-will-bear price is higher than I would pay. But, lucky for Apple, many tens of millions of people feel otherwise, and can afford to act on their feelings. So Apple prices accordingly. And then they plow a lot of the profits back into the hands of stockholders:
Apple spent $56 billion on buybacks in 2014
Publishers don't live in that high-profit world. They have good years and bad years, depending on whether there's a mega-bestseller that year. But, on average, they don't earn extraordinary profits, and lack the ability to pour billions back to the stockholders. But it's true, that, just like Apple, the big five price based on what consumers will pay rather than on their costs. Horrors