I don't think the OP is asking about the purpose of compensation in general, they're asking about difference in implementations of the error amplifier (inverting vs non-inverting).
Error amplifiers can be made using inverting and non-inverting opamp circuits. The main difference is, obviously, the 180 degree phase shift. In that flyback circuit, the optocoupler circuit acts as an inverting stage (when Ve rises, Vc falls). If the error amplifier were an inverting opamp, the overall feedback would not be negative, and the flyback would not work.
But there's also a more subtle difference between inverting and non-inverting amplifiers. For the same component values, their transfer functions (pole and zero locations) are not the same. Inverting is H = Z2/Z1, non-inverting is H = 1+ Z2/Z1. This means non-inverting error amplifiers have a limitation that their gain is always has magnitude of 1 or higher, which can be problematic in some cases (sometimes you want gain to go towards zero as frequency goes towards infinity). Another way of looking at it is that the non-inverting circuit will always have equal number of zeros and poles.