Because the titration involved strong base(NaOH) and weak acid (COOH)2. It means when reach the end point, the pH value is above 7. Phenolphthalein will have colour change at pH value of 8. So, it is suitable for detecting the end point in this case.