That's how commodity producers like farmers can be profitable. The marginal producer makes no profit, but every producer who can get their costs below the marginal producer makes a profit.
If farmers didn't make any money, they'd stop farming and we'd have no food.