When the process input, u, reaches a high enough value, it is limited in some way. Either by the numeric range internally in the PID controller, the output range of the controller, or constraints in amplifiers or the process itself. This will happen if there is a large enough difference in the measured process value and the reference set point value, typically because the process has a larger disturbance/load than the system is capable of handling.
If the controller uses an integral term, this situation can be a problematic. The integral term will sum up as long as the situation last, and when the larger disturbance/load disappear, the PID controller will overcompensate the process input until the integral sum is back to normal.
This problem can be avoided in several ways. In this implementation the maximum integral sum is limited by not allowing it to become larger than MAX_I_TERM. The correct size of the MAX_I_TERM will depend on the system and sample time used.