Many of the ones you mention were built for perceived reasons of strategy, or promoted by local interests whose business acumen was somewhat lacking.
The post-1883 flurry of building the "Baronial" lines served useful purposes in many cases, but never forget that the very reason these grants were given was that the local "big" railway compnay was already well aware that they hadn't a hope of being financially viable on their own. Railway history is littered with these; Achill, Clifden, Kenmare, Glenties and so on; lines which never traded profitably throughout their lives.
We hear clamours today of such-and-such a line "should never have been closed". While occasionally correct, this is usually quite wrong. A population something like HALF what it is today, in the 1960s, and governments simply not havinbg the financial wherewithal they have now, made almost all of the closures which did happen, inevitable.
If there was any big "sin" involved in closures, it was not so much the actual closure, but the failure to protect the rights of way of the line closed. Had these been preserved, plus a waiver that a reopening, even if decades ahead, would not need new planning permission of any sort, we would be in a much better position to address transport policy issues today.
The two we hear most of - West Cork and the Derry Road - would be impossible to resurrect now on their original routes, and light years beyond prohibitely expensive to build circuitous new-build lines around places like the south of Cork city, Portadown, Omagh and Strabane. Had the rights of way remained, reopening would be easy - especially if the state had the powers to just bulldoze anything that farmers or others had put over the former line since, without reference to any local councillors!