I asked myself the same question fifteen years earlier. Let's see if I have a better answer now !
Let's first search the source of the $\dfrac x{\ln\,x}$ term of the PNT in this derivation of Riemann's Explicit Formulas (from $(11)$ back to $(9)$ and up...).
We get $\quad\displaystyle\pi(x)\sim R(x)\sim\operatorname{li}(x)\sim \frac x{\ln\,x}\quad$ as $\;x\to +\infty\quad$ from the PNT.
The effect of the non trivial zeros is to change this very smooth curve in the staircase function representing the actual primes as shown in Matthew Watkins' site (with an animation showing the effect of the additional zeros at the end).
More exactly the PNT proofs (like Newman's) show the equivalence at infinity between the second Chebyshev function $\psi(x)$ and $x$ :
$$\psi(x)\sim x\quad\text{as}\ \ x\to +\infty$$
But $x$ is the dominant term of $(6)$ (details an animation in this link) :
$$\tag{6}\psi^*(x)=x-\sum_{\rho} \frac {x^{\rho}}{\rho}-\frac{\zeta'(0)}{\zeta(0)},\quad(x>1)$$
and was obtained by computing the residue at $s=1$ of $(5)$ :
$$\tag{5}\psi^*(x)=-\frac1{2\pi i}\int_{c-i\infty}^{c+i\infty}\frac{\zeta'(s)}{\zeta(s)}\frac{x^s}s\,ds$$
Indeed as $s\to 1$ we have $\;\displaystyle-\frac{\zeta'(s)}{\zeta(s)}\frac{x^s}s\sim \frac{s-1}{(s-1)^2}x\sim \frac x{s-1}\;$ so that the residue at $s=1$ will simply be $x$.
We are left with the quite surprising observation that the $\dfrac x{\ln\,x}$ term of the PNT comes from the simple pole of $\zeta(s)$ at $s=1$ :
$$\tag{4}\zeta(s)=\frac 1{s-1}+\gamma+O\left(\frac 1s\right)$$
Now let's see the other side : the distribution of the zeta zeros.
This time we find that the number of zeros is given by :
$$\tag{3}N(T)=\frac 1{2\pi i}\int_{\partial R}\frac{\zeta'(s)}{\zeta(s)}ds=\frac {\theta(T)}{\pi}+O(\log T)$$
The Riemann–Siegel theta function $\theta(t)$ is minus the argument of $\zeta\,$ on the critical line :
$$\tag{2}\zeta\left(\frac 12+it\right)=Z(t)\;e^{-i\theta(t)}$$
The function $Z(t)$ giving the non-trivial zeros is real and complicated while minus the argument $\;\displaystyle\theta(t):=\arg\left(\Gamma\left(\frac{2it+1}4\right)\right)-\frac{\log{\pi}}2t\quad$ is regular with a simple expansion :
$$\tag{1}\theta(t)\sim \frac t2\log\frac t{2\pi}-\frac t2+\frac {\pi}8+\frac 1{48t}+\cdots$$
Dividing this by $\pi$ gives indeed $N(T)$ and the wished repartition to first order.
Comparing these two results shows that a contour integral containing $\frac{\zeta'(s)}{\zeta(s)}$ was used in both cases but a different part retained at the end :
- the pole at $\zeta(1)$ for the PNT which analytic proofs use the fact (are equivalent to) $\zeta(1+it)\neq 0$ for any real value of $t$.
- the argument of $\zeta\left(\frac 12+it\right)$ on the critical line in the second (the formula for $\theta(t)$ was obtained using the functional equation for $\zeta\;$).
But reflexion doesn't need to stop at this point, nor lines ! :-)