Basically, the airline industry is competitive, but individual direct routes function like quasi-monopolies, and they have to make all their profits on the quasi-monopoly price charged to people who want the fastest route between two cities, say A and B.
But if Airline 1 has a quasi-monopoly on the direct A-C route, then Airline 2 can only compete by offering a cheaper, indirect route. Because 2 has a quasi-monopoly on the A-B and B-C routes, it wants to charge "legit" A-B and B-C travelers the full direct-route premium.
But if those people don't fill up the plane, and 2 wants to compete with the quasi-monopoly 1 (on A-C), then 2 ends up charging less for a combined A-B and B-C, because it has to undercut A-C's price. But that requires it to vigorously sort such travelers from the legit one-hop travelers.
With that said, cheaper-for-round-trip still doesn't make sense.