If you are looking for a proof then the recommendations given in the comments appear to be quite helpful. There is a ''physics'' type proof in $\underline{Peskin\;\&\;Schroeder's}$ textbook where they first state the formula, and then show that we obtain the same result for a scalar propagator in the canonical formulation (commutators).
However, if you would like to know the motivation for the expectation value of an operator in field theory, then we can look back at examples from introductory quantum physics. For example, the classical formula to compute the average value for energy values over a distribution is the following,
$$ \bar{E} = \frac{\int_0^\infty E*P(E)\, dE}{\int_0^\infty P(E)dE}, $$
which is just a Maxwell-Boltzmann distribution. The numerator is just the energy of the system, weighted by the probability distribution; while the denominator is the integral of finding the system with any energy.