There are several ways to tell you why there is $i\epsilon$ in physical Green function, like from direct derivation of $\langle\Omega|\text{T}{\phi(x)\phi(y)}|]\Omega\rangle$, or from path integral formalism by considering insertion of states in far past and far future. Both methods are related to consideration of causality.
However, Schwartz QFT section 14.4.2 gives another point of view that confuses me. It says that $i\epsilon$ is required by the condition of reflection positivity. The derivation is by defining reflection positivity in Euclidean signature and perform Wick rotation to Lorentz signature, which give the correct $i\epsilon$.
To me, defining reflection positivity in Euclidean signature is equivalent to have unitary Lorentz theory, so I think what really gives contribution to $i\epsilon$ would be Wick rotation?