You have to be careful in confusing "free markets" with "perfect competition". By "free markets", I think we mean free entry for new firms and/or products into the market. We don't want restrictions on innovators from bringing their ideas to the market. We typically *assume* that free entry exists in economic models, but one thing that holds back development may be the absence of this free entry (think red tape and bad institutions).
But we don't want "perfect competition" even if we do want "free markets". One of the counter-intuitive things that comes up in growth courses is that perfect competition is not conducive to rapid growth. The story here involves a few steps
Innovators and/or firms need to charge a price greater than marginal cost to earn profits, otherwise there will be no incentive to innovate, and ultimately no growth. If you allow competitors to copy innovations they will drive the price down to marginal cost, eliminating profits and incentives for innovation. We want free entry of new firms with market power, but not free entry of imitators who produce perfect competition.
But perfect competition does maximize the combined consumer and producer surplus from a given product. So there is a tension here. Perfect competition maximizes the output of *existing* products, but minimizes the output from *potential* products. Think of it this way, if we decided that we had all the types of goods and services that we could ever want, then we'd want to enforce perfect competition. We would nullify every patent, and let competition take over to maximize the output of those existing goods and services. Nullifying patents (or any other kind of intellectual property) would crush the incentives to innovate, and we'd never get any new products.
This means that it is not obvious what the right policy is for intellectual property rights and/or competition in general. It depends on your long-run perspective. You can trade off long-run growth for a higher level of current output by canceling intellectual property rights. Or you can trade off current output for a higher long-run growth rate by enforcing property rights strictly, and probably instituting even stronger ones.
There is no *right* answer here, because it depends on your time preferences. But extreme answers are probably unlikely to be optimal for anyone. Strict perfect competition - allowing imitators to ensure P=MC - isn't good because it prevents us from getting new products. Super strong market power - limiting each good to being produced by a perpetual monopolist, say - would shrink the availability of every existing product, even if it makes the incentive to innovate huge.