Because the postfix increment operator results in a temporary.
It returns a temporary int with the previous value and increases the value of the original variable. A temporary can't be used as an lvalue, so an assignment won't work.
The prefix increment operator increases the original variable and returns a reference to it. Therefore there is no problem in this case.