IIS provides a number of common capabilities that are not available by default in self-hosted web services. Supervisor: it monitors the health of the web application and will kill/respawn the application if it starts looking unhealthy (using too much memory, CPU, etc. -- configurable). Resource limits like CPU usage, connection limits, etc. Run as a certain user for least privilege security. Manage certificates/SSL. Host/manage many applications through one port/interface. Reverse proxy to console applications. A lot of other things I didn't mention like request logging.
I'm unfamiliar with Tomcat, but I assume it's the same story. You get extra hosting features that self-hosting does not give you by default and may be quite difficult to implement yourself.
Often products that do expose a self-hosted web service will still recommend putting them behind a reverse proxy or other supervisor in production. This may be to ensure it will survive crashes or be graceful during network interruptions. I'm thinking of NGINX for Docker services, for instance. In the .NET space, I believe Kestrel is reverse proxied through IIS as standard practice (or maybe NGINX on Linux/Mac).
Traditionally, ASP.NET apps have been windows-only hosted on Internet Information Server (IIS). The recommended way to run ASP.NET Core applications on Windows is still using IIS, but as a reverse-proxy server. The ASP.NET Core Module in IIS manages and proxies requests to the Kestrel HTTP server hosted out-of-process.