This is a quirk of the way in which airlines price their routes, which has little to do with the distance flown. The prices are driven by market conditions.
Prices drop when there is a lot of competition on a route.
Usually such hidden city fares occur when A and C aren't hubs for the carrier in question, but B is, and B is dominated by the airline. Theoretically, you could buy a ticket from A to B, get off at point C, and throw away the B to C portion, saving some money, if point C was your ultimate destination. Airlines frown on this practice, and taking advantage of a hidden city fare is explicitly forbidden by their rules. You also can't take advantage of a hidden city fare if you've checked any baggage, as your baggage will be sent through to your ultimate destination. Airlines have started to really crack down on the use of hidden city fares.