``These areas were originally intended for libraries of compiled subroutines, to be searched during the linking phase following the compilation of a program" [p. 27]EF:UNIX. Those areas now also contain programs not directly available to users but used by other programs, such as compilers. They also contain databases (fonts, conversion units, etc.) used by programs.
On some systems (such as Suns), the /lib points to /usr/lib. Hence, both directories share the same information.
Again, both exist for historical reasons.