Understanding Sync with Gmail?

I recently switched to Gmail from Outlook because it's been messing up alot lately and plus I just want all my emails in one spot. I was going through settings and seen theres a Days to Sync setting. It's set to 30 days. I'm not 100% sure what I should set it to. I'm kind of confused since it's set to 30 days and I have emails in my inbox from a year ago. What does the sync do? Is it for offline use?

2017-04-11T00:37:33.809Z