Because it is platform-independent that way.
Let's put it this way:
They could create a DLL with some specific entry-point, and assume it's always consumed by IIS via ISAPI.
But what about the cases where you don't run it on IIS, not via ISAPI, and not on Windows ?
That's right, you'd have to program some modules for each and every webserver out there, in order for it to be able to interact with your DLL. Plus you'd need a web-server. You might also need to update all of those modules whenever something changes. And then you need to package it for a boatload of different Linux distros, plus Mac and Windows, and Android and iPhone, etc.
And why would you do that ?
For that it only runs on IIS and only on Windows ?
Bad idea.
Nowadays, most servers run Linux, so do most routers and printers, while most mobiles run Android (aka Linux) or iOS, and most TV OSes are Linux-based.
If you have a main method, you can create a simple console program, with which can start a web-server on a certain port, which you can then use to forward traffic to (from NGINX/Apache via remote-proxy). Or you can forward SSL traffic directely to that web-server via HAproxy.
No IIS or ISAPI required.
If you use HAproxy, no NGINX or Apache required, too - because you can forward directely to kestrel.
And if it must, it can run inside IIS as well.
Maybe that makes IIS integration a little bit more complicated, but it also makes integrating into a Linux/Unix/Mac-environment (or any other, such as mobile phones) so much easier. And as said, most servers use Linux nowadays. Especially if run in containers like Docker/LXC.
It would be absolutely breathtakingly monumentally stupid to do anything else but that.
Also, it's a silent admission that they (MS) lost in the server space, and are now salvaging what there is to salvage (however, that last sentence is just my opinon, not necessarely a fact).