# Why real wage equals marginal product of labor when return to scale is constant?

I can understand that real wage will equal MPL(marginal product of labor) when MPL is diminishing, because firms will employ more labor until MPL falls to real wage.

While, if MPL is constant, implied by constant return to scale, MPL will be predetermined as well as real wage, which won't be affected by firms' behaviors. How can we affirm that MPL equals real wage when they are irrelevant? Not to mention the conclusion of zero economic profit.

Consider that the following production function $Y=F(K,L)$ excibits constant returns to scale ie $F(x K, x L)=x F(K,L)$, for any arbitrary scalar $x$. This means in plain English that eg for $x=2$, doubling the inputs will produce double the output. The intuition behind constant returns to scale is that inputs and outputs are directly proportionate.
In technical terms, an $F$ like that, is called linearly homogeneous. Such functions display the following characteristic, by virtue of their definition: $Y=K\frac{\partial F}{\partial K}+L\frac{\partial F}{\partial L}$. The total value of F can be decomposed into a sum of products; each product is made up of the quantity of the relevant factor and its corresponding marginal product.
Now consider how a firm that is using a constant returns to scale technology and is also a pricetaker in product and labor markets will solve its profit maximization problem; standard treatment proposes that it will find it profitable to employ each production factor up to the point where the value marginal product equals the factor's price or $P_Y MP_X = P_X$, where $X=K,L$.