I don't know if I understood your question, but it seems to be: "why the generating functional $Z[J]$ defined by the path integral in equation (1) has the property that it generates exactly the time-ordered correlation functions of the underlying QFT?". Here I sketch a way to justify that based on the Dyson-Schwinger (DS) functional differential equation.
The basic idea is this: the fundamental objects in QFT are the Green's functions. They are, for example, the way in which one is able to evaluate the ${\cal S}$-matrix by the LSZ prescription. Let us consider a scalar field for simplicity. In that case, the object of interest is $$G_n(x_1,\dots, x_n)=\langle \Omega |T\{\phi(x_1)\cdots \phi(x_n)\}|\Omega\rangle\tag{1}.$$
Now, suppose we know all the Green's functions (1). If that is the case, we may encode them in a generating functional:
$$Z[J]=\sum_{n=0}^\infty \dfrac{1}{n!}\int d^dx_1\cdots d^dx_n j(x_1)\cdots j(x_n)\langle\Omega|T\{\phi(x_1)\cdots \phi(x_n)\}|\Omega\rangle\tag{2}.$$
The so-defined $Z[J]$, by definition, has the property that: $$\dfrac{\delta^nZ[J]}{\delta j(x_1)\cdots \delta j(x_n)}\bigg|_{j=0}=\langle \Omega|T\{\phi(x_1)\cdots \phi(x_n)\}|\Omega\rangle\tag{3},$$
and so, by (2) and (3) we see that knowledge of $Z[J]$ is equivalent to knowledge of the Green's functions. But how can we take advantage of that? Is there some way to obtain $Z[J]$ without knowing the Green's functions in the first place?
Well, it turns out that one may prove that $Z[J]$ must obey one functional differential equation known as the Dyson-Schwinger equation. A very clear exposition of how you may derive that $Z[J]$ obeys this equation is provided in "Path integral methods in quantum field theory" by R. J. Rivers in sections 1.1 - 1.3, and I encourage you to study the details. Here I just quote the result, given in equation (1.29) of the book, in order to address your question:
$$\left[\left(\dfrac{\delta S[\phi]}{\delta \phi(x)}\right)\bigg|_{-i\frac{\delta}{\delta J(x)}}+J(x)\right]Z[J]=0\tag{4}$$
where the first term in bracket means that we take the functional derivative of the action $S[\phi]$ and replace $\phi(x)$ by the operator $-i\frac{\delta}{\delta J(x)}$. Now we can formally solve (4) by a functional Fourier transform. In other words, let us define $\hat{Z}[\varphi]$ by $$Z[J]=\int \mathfrak{D}\varphi \hat{Z}[\varphi]e^{i\int d^dy J(y)\varphi(y)}\tag{5}.$$
Now we plug the ansatz in (4). We observe that $\frac{\delta S[\phi]}{\delta \phi(x)}$ with $\phi(x)$ replaced by $-i\frac{\delta}{\delta J(x)}$ is a polynomial in such functional derivatives. When they hit (5) each of them is effectively replaced by $\varphi(x)$. On the other hand, we can get $J(x)\hat{Z}[\varphi]$ by differentiating $\hat{Z}[\varphi]$ with respect to $\varphi(x)$. So we can write $$\left[\left(\dfrac{\delta S[\phi]}{\delta \phi(x)}\right)\bigg|_{-i\frac{\delta}{\delta J(x)}}+J(x)\right]Z[J]=\int \mathfrak{D}\varphi \bigg[\left(\dfrac{\delta S[\varphi]}{\delta \varphi(x)}\right)\hat{Z}[\varphi]-i\dfrac{\delta \hat{Z}[\varphi]}{\delta \varphi(x)}\bigg]e^{i\int d^dy J(y)\varphi(y)}.\tag{6}$$
This means we get the Fourier space equation $$\dfrac{\delta \hat{Z}[\varphi]}{\delta \varphi(x)}=i\dfrac{\delta S[\varphi]}{\delta\varphi(x)}\hat{Z}[\varphi]\tag{7}.$$
This equation immediately implies one exponential solution
$$\hat{Z}[\varphi]= N e^{iS[\varphi]}\tag{8},$$
which given (5) implies that we must have $$Z[J]=N\int \mathfrak{D}\varphi e^{iS[\varphi]+i\int d^dx J(x)\varphi(x)}\tag{9}.$$
The logic here is the following: the path integral representation of $Z[J]$ (9) gives you the Green's functions of the theory because the generating functional $Z[J]$ of such Green's functions is constrained to solve the DS equation (4) which turns out to have (9) as a solution.
One final caveat is the following. One may evaluate (9) exactly in the free theory and use perturbation theory afterwards. Still, in the free theory, solving (9) demands finding the inverse of the wave operator appearing in the equations of motion of the free theory. For example $\Box+m^2$ for scalar fields. Now, in Lorentzian signature $(\Box+m^2)$ admits more than one inverse, so a prescription is required. The key then is to recall that we want $Z[J]$ to generate time-ordered correlation functions. This is an extra, implicit, boundary condition, that one must take into account when solving (9). It translates eventually into the $i\epsilon$ prescription to the propagator.