Work done in an isothermal irreversible process
The key word here is irreversible. Irreversible processes are more like sudden jerks or a quick change in the system and therefore the ${P_{\text{ext}}}$ is not same as the ${P_{\text{int}}}$ throughout the process.


  Why do we NOT use the internal pressure (${P_{\text{int}}}$) to find the work done?
  It is very difficult to find the ${P_{\text{int}}}$ exerted by the gas in the container since ${P_{\text{int}}}$ is varying with time. For this, we would have to use integration. Something like this:$${W_{\text{int}} = P(V)_{\text{int}}\mathrm{d}V}$$
  (where $P(V)_{\text{int}}$ is a function of $V$) 
  But we know the value of ${P_{\text{ext}}}$ and this is constant throughout the process. This is why we use ${P_{\text{ext}}}$ instead of troubling ourselves with integration. Something like this: $$W_{ext}= P_{\text{ext}} \mathrm{d}V$$


So if a system undergoes a decrement in volume suddenly, it is the external pressure that does the positive work throughout this decrement. The equation would be: $$W_{\text{ext}}= P_{\text{ext}}\mathrm{d}V$$ (However we can use ${P_{int}}$ as well, please read the NOTE at the bottom)

And if a system undergoes an increment in volume suddenly, ${P_{\text{int}}}$ is doing the positive work. However, to find the $W_{int}$ we would have to use integration since ${P_{\text{int}}}$ is varying with time. It is much easier if we just find the negative work done by ${P_{\text{ext}}}$ and since we know that $${W_{\text{int}} = - W_{\text{ext}}}$$ we can find the work done. This is why we consider the ${P_{\text{ext}}}$ and according to the situation in the question, we apply the signs. 

NOTE: Magnitude of work done by the internal pressure and external pressure is always same. We only use ${P_{\text{ext}}}$ because it is constant whereas ${P_{\text{int}}}$ varies with time. If we use integration to find ${W_{\text{int}} = P(V)_{\text{int}}\mathrm{d}V}$, where $P(V)_{\text{int}}$ is a function of $V$, we will get the same magnitude as we would from $W_{\text{ext}}= P_{\text{ext}} \mathrm{d}V$. Only signs are opposite.