Sir doubt in the mod

sir if we know after adding mod and taking mod will give same answer then why we add mod??
example

ans=(ans+mod)%mod

if this and

ans=(ans)%mod

is same then why we add mod?? is there any specfic reason behind it?

Hey @tejasddongare
Check this : Please explain the code