nothing illegal, its just as good as a publicly available index.html page. It will only be unethical or illegal if it was behind a password-protected page and the competitors peeps into it.Accessing and using a competitor's Sitemap.XML without their permission or in violation of ethical and legal standards can be considered unethical and potentially illegal.
Competitor's Sitemap.XML is unethical and potentially illegal; ethical alternatives include analyzing publicly available information, using legitimate competitor analysis tools, and exploring industry reports.