In a non-ideal pulley (with friction at axle to be negligible) the tension on both side of rope is not equal because friction is present between rope and pulley, but when we write torque on the pulley then we only write:
$$ T_1R - T_2R= I\alpha $$
where $T_1$, $T_2$ are tension on either side of rope hanging on the pulley and $I$, $\alpha$ are moment of inertia of pulley and angular acceleration of pulley respectively. why we are not including torque due to fiction in the equation.