To see why the two curves have to just touch, realize that if any part of the demand curve lies above average costs, there’s a profit opportunity—because price exceeds average costs. Free entry will continue until this opportunity is eliminated. And, if the demand curve lies entirely below average costs, then incumbent businesses must be making losses because price is always below average costs. Incumbent businesses will exit until these losses are eliminated. When the two curves touch, the best a company can do is make zero economic profits, which is a long-run equilibrium, because it’ll lead the industry to neither expand (through entry) nor contract (through exit).