So various books and sources have agreed on defining specific heat capacity (formally) to be:
$$c_v=\frac{T}{n}\left(\frac{\partial S}{\partial T}\right)_V=\frac{1}{n}\left(\frac{\delta Q_{reversible}}{dT}\right)_V$$ $$c_p=\frac{T}{n}\left(\frac{\partial S}{\partial T}\right)_p=\frac{1}{n}\left(\frac{\delta Q_{reversible}}{dT}\right)_p$$
Suppose now one wants to calculate the amount of heat required to heat a certain gas under constant pressure from T1 to T2 (using the specific heat capacity at T1) $$Q_{gas}=mc_{p}(T_2-T_1)=mT_1\Delta S$$
The entire heating process is neither reversible nor quasi-static. Why in real life (or at least in exercise problems), we take the above result $mT_1ΔS$ as a good approximation as the heat required?