Numbering in phenolphthalein versus ascorbic acid
The subsituents do not take the highest priority here, rather, it is the parent molecule that determines the numbering. According IUPAC's organic chemistry book for nomenclature, the Blue Book, for heteromonocyclic components fused to a benzene ring:


  P-25.2.2.4 (...) The presence of a single heteroatom determines the numbering in a monocyclic compound; the heteroatom has the locant ‘1’.


This gives the following numbering for the isomers of benzofuran:



The parent molecule of ascorbic acid is a furan ring, for which the numbering is dictated by skeletal replacement ('a') nomenclature:


  P-15.4.1.2 For naming and numbering purposes, the following decreasing order of seniority is followed: $\ce{F}$ > $\ce{Cl}$ > $\ce{Br}$ > $\ce{I}$ > $\ce{At}$ > $\ce{O}$ > $\ce{S}$ > $\ce{Se}$ > $\ce{Te}$ > $\ce{Po}$ > $\ce{N}$ > $\ce{P}$ > $\ce{As}$ > $\ce{Sb}$ > $\ce{Bi}$ > $\ce{C}$ > $\ce{Si}$ > $\ce{Ge}$ > $\ce{Sn}$ > $\ce{Pb}$ > $\ce{B}$ > $\ce{Al}$ > $\ce{Ga}$ > $\ce{In}$ > $\ce{Tl}$.