Connections are generally cheaper than nonstop flights, and the reason is unglamorous: a nonstop is the product people want, so it is priced as one. A connecting itinerary fills seats on legs that would otherwise go out half empty, and it puts the airline's routing convenience above yours. You are paid for that in fare.
What the fare page leaves out
Time is the obvious cost, and it is usually understated. A two-hour layover is not two hours: it is descent, taxi, deplaning, a terminal change, security again on some itineraries, then boarding. Half a day disappears without anything going wrong.
The less obvious cost is who is responsible when something does go wrong. On a single ticket, a missed connection caused by a late first leg is the airline's problem: they rebook you, and in many jurisdictions they owe you care while you wait. On two separate tickets, the second airline has sold you a seat on a flight you did not board and owes you nothing. That distinction is worth more than the fare difference on most itineraries.
Two tickets also mean collecting and re-checking your bag, paying a second bag fee on carriers that charge one, and clearing immigration at the connection point even if you never intended to leave the airport. Check whether the transfer country requires a visa for that, because a "self-transfer" that needs one is not a saving.
When the connection is the right answer
When the saving is large, the itinerary is a single ticket, and the layover is long enough that a normal delay does not eat it. Airlines publish a minimum connection time for each airport; treat that as the legal minimum rather than a plan, and give yourself more at large hubs and on international transfers.
A long layover in a city you would like to see is a separate kind of win: with enough hours, a connection stops being dead time and becomes a short visit.
When to just pay for nonstop
When the gap is small, because an extra half day of airports is not worth the difference. When you are travelling with small children, a lot of luggage, or a fixed commitment shortly after landing. And when the only cheap option is a self-transfer on separate tickets with a tight gap, which is the itinerary that turns a saving into a new ticket bought at the airport.
You do not have to decide up front
Set a price alert on the route and, if a connection is genuinely out of the question, turn on the nonstop filter: connecting flights then disappear from the alerts and from the cheaper-nearby notes. Leave it off and you will see both, at which point the comparison is two real fares rather than a rule of thumb.