Why are tensions in the pulley different when the pulley has a mass or moment of inertia?
Problems that depict situations where the tensions are same on ropes on both sides of the pulley are ideal situations.It is stated so in order to minimize any complexities that may arise if the pulley was to rotate.Now, if the tensions were not equal on both sides, the pulley would experience a net non-zero torque and hence a net angular acceleration and eventually rotate.Also,these are cases where pulleys have friction between its rim and the rope..if there were no friction on the rope-rim interface the pulley would not turn and its mass would become irrelevant .