Functional classification doesn't exactly match 1-to-1 with OpenStreetMap's definitions of highways, and shouldn't be the source of classifying highways. It is difficult to generalize since it's a case-by-case basis, but, instead, we base road classification on how a highway serves from a connectivity standpoint and how it compares to other nearby highways, with secondary criteria like traffic data and physical characteristics sometimes playing a role in this process. When using this criteria is applied, it also avoids confusing dead-end primary routes like PA 113 in Phoenixville.

Around the East Coast, places tagged as towns like Leola and New Holland are typically linked to the road network with primary roads or higher (trunk/motorway). It may also be of reason to tag PA 29 from Phoenixville to Malvern as primary for this same reason, also considering its connections to motorways (the PA Turnpike and US Route 202).

The OSM Wiki has better explanations than I do for how highways are being classified, talking about specific classifications and why to avoid functional classification: https://wiki.openstreetmap.org/wiki/United_States/2021_Highway_Classification_Guidance