Why we do (Inc+Dec-1) to get max subarray?

I am not able to understand why we do it ?

please, attach your code.