They manage it anyway !
Take the 2 longest routes currently flown (SIN/JFK and SIN/LAX). This is SIngapore Airlines flights, performed by A345. ANd They maintain the routes, which means they make enough profit on it by attracting customers on one of these two hubs (JFK/LAX) and rerouting them after.
So, IMHO, Ultra long haul can be pretty efficient when you use it with connecting flights in reality.
I think, by and large, the whole point of ULH routes in long-haul is so that one doesn't
have connecting flights.
But do not assume that simply because an airline is flying a route today that they must be making money on it.
For one, just because an airline operates a route doesn't mean they do so profitably. Many, many routes, probably most
routes, are operated everyday that money is lost on. If airlines made money on every route or even the majority of the routes they operated they wouldn't be in the black far more often than not.
And secondly, for most airlines they have or do operate ULH, it's a 'halo' route or a loss leader. They're willing to take a loss simply for the ability to say they operate said route and the associated prestige that goes along with it, or for the convenience of offering it to loyal customers that fly other routes they do
make money on.
And lastly, in real-life airlines can offer premiums for services that we cannot. In real-life, most ULH routes are flown in aircraft specifically configured with fewer seats and far more Business and First-class who pay a premium not only for the seat but for the non-stop service (in your mentioned SIN-JFK routing, that A345 flies with only 100 seats for example). This yields fewer passengers, which yields MUCH lower fuel costs (versus ferrying an extra 20 tons across the Pacific), but each passenger pays a much higher fare. So you're achieving as much, if not more, revenue with lower fuel costs.