This can be used to implement custom web servers, for example. A well-known technique for which Node.js is used is RestAPIs. A RestAPI is a server-side interface, which together with the frontend represent a complete web application. The client sends a HTTP request to the RestAPI, which then e.g. writes/reads data into a database or sends a chat message to other active participants of the web application via a socket connection.
Interested? Have a look around!