This can happen when the pricing logic does not allow the cheapest fares on each segment to be combined as a single fare. This check does not seem to be made when you price the segments individually even though it is a connection. I don't think that the airlines have thought to forbid this in the T&C.