Because you need to implement a tiny HTTP server for WebSockets anyway (if you want't them to work from browsers). So, adding the ability to serve static files on top of that is trivial.
Not sure why they added CGI, though.
Not sure why they added CGI, though.