Correlation functions (or Wightman N-point functions) are expectation values of renormalized products of field operators at finite times. The ordering of the operators matters since fields at general arguments do not commute.. The correlation functions need for their nonperturbative definition via a path integral definition the in-in formalism (= closed time path, CTP, Schwinger-Keldysh formalism) where one integrates over a doubled time contour.
The S-matrix elements are computed from the expectations of time-ordered products of field operators (hence independent of the ordering of the operators), which occur in the LSZ formula and in functional derivatives of the standard path integral. They express in-out properties of asymptotic states of scattering experiments. They are obtained in a path integral formulation by integration along a single time path from $t=-\infty$ to $t=+\infty$. As such they also appear inside the CTP formalism.
The information in a time-ordered products is less than in the ordinary product as one can calculate $T(\phi(x)\phi(y))$ from $\phi(x)\phi(y)$ and $\phi(y)\phi(x)$ (away from its singularity at $(x-y)^2=0$), while the converse is not possible.
Correlation functions are important if you want to see the Hilbert space. Therefore the CTP path integral takes a doubled time path, so that it returns to the initial state, which computes expectation values in the initial state. The images of the initial state under products of field operators span a dense set of vectors in the Hilbert space. Therefore, at least in in principle, one can compute inner products of arbitrary state vectors using the CTP formalism. The S-matrix doesn't contain this information.
As a consequence, the in-out description of quantum field theory - though simpler and covered by every textbook on QFT - is incomplete as it only gives the asymptotic properties of a quantum field, while the in-in description - though more involved and only in textbooks treating nonequilibrium statistical mechanics - gives everything - the asymptotics and the finite time behavior.