Say I run 10 trials that cost 10m each but only one of these finds a drug that works. How much did the trial cost to discover that drug? How much did it cost to discover that drug? 10m? 10*10m?
10M. Failure is still useful information so the other 9 trials cost 10M each but didn't produce a viable product, but that doesn't mean nothing of value was gained.
So like any business. Just because 90% of restaurants fail doesn't mean the cost of running a restaurant is 10x of what it actually takes to run a successful one.
Restaurants also price their food considering the risk taken by the entrepreneur launching the restaurant; which is substantially lower as its a high cash flow business with immediate feedback for a low capital investment