Now, it's different. No default route is created by default and no 404 error is returned by default when a route is not matched. The routing system is added on the HTTP pipeline as a middleware.
On Windows, IIS will only redirect to kestrel or any other web server using the aspnetcore module on the IIS mapping handlers.
If a URL requested by a client matches an existing route in the route collection, the RouteAsync method of its handler is called, and if there's an exception handling the request, the next route pattern is tried instead of directly returning a 404 error.