The fallacy that you're encountering is that you're looking at the flight in a vacuum. UA would never (intentionally) price ORD-KC for $27. The appropriate question is how much was the flight in total from PHL-KC? When you see the PDQs displayed, you're see how they attribute the total amount between the two connecting segments.