It's down to the premium that a carrier can charge for the convenience of a direct flight.
There will also usually be more indirect options so more competition between carriers providing indirect flights.
Every so often the press rediscover this - eg. that it's cheaper to fly a routing like AMS-LHR-JFK with BA than just purchase the LHR-JFK leg on the same flight.