This splitting is pretty typical for most services. I'm on Fedora but most distributions do the same in terms of organizing files based on their type, into designated areas.
Taking a look at the Postgres SQL server:
- The configuration files go into
- Executables go into
- Libraries go into
- Locale information goes into
- Man pages and docs goes into
- Data goes into
The rational for having a libraries directory
usr/lib/postgresql in your case, which is equivalent to
/usr/lib64/pgsql/ for my install, is that applications can make use of libraries of functions that are provided by Postgres. These functions are contained in these libraries.
So as an application developer, you could link against the libraries here to incorporate function calls into Postgres, into your application. These libraries will often times include API documentation, and the developers of Postgres make sure to keep their API specified and working correctly through these libraries, so that applications that make use of them, can be guaranteed that they'll work correctly with this particular version of Postgres.