Sitemap.xml is used to tell the google bots about your website pages. Basically xml sitemap is used for spiders and users. You can set frequency and priority while creating this and upload this through your webmaster tool.

XML Sitemap is an easy way for you to submit all your URLs to the Google index and get detailed reports about the visibility of your pages on Google. This helps search engines to more intelligently crawl a website and keep their results up to date.