Why a clean sitemap matters
A sitemap tells search engines which URLs you want indexed. When it lists broken, redirected or duplicate URLs, crawlers waste time on them and start trusting the sitemap less. Google's own guidance is to list only canonical, indexable URLs that return 200.
Accurate lastmod dates help too: they tell crawlers which pages changed, so updated content gets recrawled sooner.
Common sitemap mistakes
Listing http:// URLs on an https site, including redirected or deleted pages, mixing www and non-www, listing noindex pages, and forgetting to update lastmod. Each one is easy to fix once you can see it.