Good question! One example use case is if you're building a custom IPC library like ZeroMQ and you want to use sockets as an underlying transport mechanism. Another possible use case is if you're implementing a custom protocol on top of TCP/UDP. You'll probably use a wrapper library that exposes sockets in a higher level way though, as opposed to calling the C functions I talk about in the post.