What is the difference between a lag compensation and PI control?
Well, the two systems differ only at low frequencies. In fact, if you define
$$
R_L = \dfrac{\tau_zs+1}{\tau_ps+1},\qquad R_I = \dfrac{\tau_zs+1}{\tau_ps}
$$
you have that $R_I(j\omega)\underset{\omega\to\infty}{\to}R_L(j\omega)$.
Therefore, you can expect that the behavior of the closed-loop system differs only at lower frequencies.
What does the PI do?
Consider a plant $G(s)$, define $L_I(s)=R_I(s)G(s)$ and $L(s)=R_L(s)G(s)$. Define the functions
\begin{align*}
F(s) &amp;= \dfrac{L(s)}{1+L(s)},&amp; S(s)&amp;=\dfrac{1}{1+L(s)}, &amp; D(s)&amp;=\dfrac{G(s)}{1+L(s)}
\end{align*}
$F(s)$ is the transfer function from the reference and the output, $S$ is the transfer function from a disturbance acting at the output of $G(s)$ and the system output and $D(s)$ is the transfer function from a disturbance acting additively on the control input and the system output. As you easily see, at frequency $\omega=0$ you have $F(0j)=1$, $S(0j)=0$, $D(0j)=0$. This implies that at front of any constant unknown references and/or disturbances, you always get zero error, provided that the system is stable.
What a lag net cannot do
With a lag controller you do not have the above robustness property. In fact, even if by using a lag net together with an appropriate feed-forward action, you can still have zero steady state error at front of constant references, that is not a robust solution. The reason is simply that the feed-forward control law will (highly) depend on the plant parameters and therefore, as you put an uncertainty on the plant, you lose the zero steady state error property.
With an integral action instead, as long as the system is stable, you always obtain a zero error given constant references and/or disturbances, no matter how large the parameter uncertainty. The only thing you need to ensure is the closed-loop stability, and note that to stabilize a system you don't really need perfect knowledge of the parameters and in fact typically you can tolerate quite high uncertainties.
So why should I use lag controllers?
Well, if you need robust regulation w.r.t. constant references and/or uncertainties there is no theoretical reason to go for a lag controller. I would definitely go for a PI. However, not all the tasks are about regulating a system at front of constant references. Having a pole in the origin to track a sinusoid is not that awesome, is it? The point is, what do you need your controller to do? Every distinct answer to this question needs a different controller, and you typically chose your lag or PI or other control configuration to shape the frequency response of the closed-loop system. Think about this: how would you design a controller to have zero error given references that are sinusoids at frequency $\omega=3$?