Sockets were first introduced in early 1980s with the release of Berkeley UNIX. Initially sockets were primarily exposing TCP services, RFC-793.
Later releases extended the support for other protocols and additional layers.
While sockets were initially UNIX centeric, socket implementations in other operating environments (e.g, DOS, VMS, ...) are readily available now.
The model of sockets pre-dates the definition of ISO transport services. In particular the model for connection establishment phase of sockets is less flexible than the ISO model.
TLI and Sockets can be viewed as two parallel approaches for exposing transport services in the UNIX environment. Sockets have probably a larger installed base of existing applications. TLI is recognized as the preferred transport interface. Software packages that map TLI to Sockets and Sockets to TLI exist.