CUPS implements its own web server to host CGI programs on http://localhost:631
server: https://github.com/apple/cups/blob/master/cups/http.c
CGI pages: https://github.com/apple/cups/tree/master/cgi-bin
Creating a web server just for a printing daemon seems like duplicate code and bloat that might lead to code harder to maintain and possible creation of bugs.
Why an actual httpd daemon like Apache is not used?