Use of %mod in code

What is the use of %MOD while checking the previous DP array element?
Why do we need to do %MOD and not just add the previous cell value?

Hey @sonalbera Usually in counting answers problems the answer gets very very large and therfore sometimes get out of bound or out of the range of even long long int data type, thus to make sure the answer setter stays in bound with affecting the correctness of the solution, the problem setters tell us to print answer % 1000000007.
So here also while storing we do dp[i][j]%Mod just to stay in data type limit. Nothing else