Why does phenolphthalein form in this reaction?
In the Org. Syn. link you provided phthalic anhydride 1 and p-chlorophenol 2 in 95% H2SO4 and boric acid at 200oC undergo condensation and cyclization. Phthalic anhydride 1 under acid catalysis reacts with p-chlorophenol 2 at the ortho position as shown below to form ketoacid 3. Chlorine is a weak o,p-director and boric acid, I believe, is complexing with the phenolic hydroxyl and the ketone to reduce bond rotation and aid in cyclization to form anthroquinone 4. There is an aqueous work-up at this point followed by treatment with hot aqueous KOH which forms quinizarin 5 by nucleophilic aromatic substitution which is aided by the adjacent keto group.  
In the reaction of phthalic anhydride 1 with phenol 7 in the presence of sulfuric acid, (presumably no boric acid), cyclization is repressed because of a lack of electron density at the phenol meta-position in 6. In addition, protonation of the ketone in 6 gives extended conjugation with the phenolic hydroxyl. Preferrable addition of phenol to the ketone of 6 leads to 8 and on to phenolphthalein 9.