How can perfectly competitive firms earn zero profits? Consider a firm that chooses the quantity of labour $L$ to hire which maximises its profits. As usual, we suppose that output $Y$ is increasing in $L$ but at a strictly decreasing rate; and for simplicity, we suppose that labour is the only input used in production. The firm takes wages $w$ and the price of its output $p$ as given (which is meant to capture the notion that the goods and labour market are 'perfectly competitive').

As everyone knows, the firm should hire labour until it has driven the marginal revenue product of labour down to the wage. That is, the optimal quantity of labour $L^*$ must satisfy

$ w=MPL(L^*)p$

Here is the puzzle. If the firm chooses this level of $L$, it will make no profit from the last worker. But since $MPL$ is strictly decreasing in $L$, that means it makes a positive profit on all of the previous workers. As a result, the firm must make a profit - something which is meant to be impossible in perfect competition, at least in the long run!

To see the point graphically, note that the firm's profits are given by the triangle below the 'VMPL curve' and above the market wage:



Clearly, the area of this triangle is positive!

Before opening this up to discussion, I'll review some possible solutions:


One might think that the solution relates to the distinction between 'economic profit' and 'accounting profit'. However, this is a mistake. Suppose that there are no costs associated with production other than the wage bill (e.g. decision making is 'free'). Then there is no distinction to be drawn (economic profit = accounting profit) and yet the puzzle persists.
One might think that, under perfect competition, prices (whether $w$ or $p$) somehow adjust to wipe out the profits. But, as can easily be seen (e.g. from the graph), profits will be strictly positive for any $w$ and $p$ that induces $L^* &gt; 0$.
As you will have noticed, the firm won't make any profit if MPL is flat. Perhaps this needs to hold in the long run?
One final solution (my favourite) is that, in perfect competition, the only firms will exist are those which minimise their average costs. One might think that this then induces near zero $L^*$ and thus near zero profits. But here one hits a technical problem: there is no value of $L &gt; 0$ which minimises average costs. For any $L^* &gt; 0$ you choose, average costs will be lower if $L = L^* - \epsilon$ for some $\epsilon &gt; 0$.


Thanks in advance for any thoughts on this!
First, let's deal with the semantics and terminology aspect: what the word "profit" means in Economics, and what the word means in the everyday/business/accounting use, are two different things. 

In its everyday business use "profit" is the surplus above all expenses including depreciation. So what business call "profit" the Economics discipline calls "net return to invested capital".

In Economics on the other hand, "profit", although never really "officially" defined universally, it essentially means "excess returns to capital above the market level", where the "market level", sometimes means "average level" sometimes it means "perfect competition level", or some other notion of equilibrium returns in the absence of exploitation of market frictions, market power and the like. 

Perfectly competitive firms earn zero profits because perfect competition drives prices down to average cost - but where in "cost" we include what business call profits, because for us, it is payment to capital used in production. 

Now let's consider the specific example of the OP, where "for simplicity" we have a single production factor, and where, the production function is strictly concave:

$$Q= F(L), \;F'&gt;0, \;F''&lt;0$$

The profit maximization problem here is 

$$\pi = pQ - wL,\;\; \text{f.o.c.}: \;pF' = w \implies L^* = (F')^{-1}(w/p)$$

$$\pi^* = pF - pF'L = p(F-F'L)$$

For zero profits we should have

$$\pi^*=0\implies F - F'L = 0 \implies \frac {F}{L} = F'$$

or that average product in real terms equals marginal product. As long as the functional form of the production function is such that there is a positive level of $L$ for which this equality can hold, the argument of the theory is that competition will push the price to a level where the level of labour chosen will be such that all revenues go to payments for labor.  

And if the production function does not allow for such an equality, then it simply is not compatible with a perfectly competitive market structure.  

The OP should figure out how and why the diagram used in their post is misleading.