It might appear to be thriving, but I would be very surprised if the Settle-Carlisle line was making any kind of profit for Network Rail.
The passenger service needs heavy subsidy. Whatever the freight companies are paying - and they generally pay much less than the fair rate for the wear and tear they cause - must pale into insignificance compared with the huge capital cost of the ongoing renewal of the permanent way.
Even when that expenditure is complete, this is a very expensive line to maintain compared with the still relatively small number of trains using it.