stdio.h and unistd.h are header files, not libraries.
stdio.h is the header for stream/buffered I/O(like printf()).
unistd.h is the header for the POSIX API(like read()). You probably see the use of low level functions like read() because the examples are working directly with file descriptors - ie: sockets. stream I/O uses file pointers. The choice to use buffered/non-buffered I/O depends on what the application is doing.