It's not totally mad, Lanark and Carluke aren't that far away, and Carstairs is in the middle of a really awkward bit of main line to serve. Had it not been for the Sleeper, closure may well have been the more effective option (and tbh the Sleeper could easily have split at Carlisle or Mossend yard if they'd really wanted to get rid of Carstairs station.
Remember what the railway needs is revenue, not passengers. Local stations should not be maintained on mainlines to the prejudice of trains that actually generate revenue, like the premier London-Scottish expresses (Reston looking at you).
The idea of closing stations is heavily resisted, and let’s not forget, this will be the second major change at Carstairs since it ceased being used as a primary InterCity station. It has already been rebuilt once, when Strathclyde Transport demolished the old station.
Up until the introduction of regular TPE services to Edinburgh, it was a very popular interchange in the morning, with a northbound train (from Manchester) stopping, and passengers from Edinburgh changing over. That’s the primary reason that the station was (and remains) staffed in the AM only, although that interchange no longer occurs.
Lanarkshire is an odd place geographically. I know, I live there. I “technically” live in Carluke, my address and postcode are Carluke. But Carluke itself is 3-4 miles away, at the top of a steep valley. By public transport I have no link to Carluke, or its station. My bus takes me to Lanark. There are no trains to Edinburgh from Lanark and taking the train from Lanark to Carluke to change for Edinburgh makes for a very tight connection in the morning at Carluke (last time I had to run, very fast, over the icy footbridge). So, actually, it’s a smoother connection for me, a resident of Carluke (but in the valley), to take a bus from Lanark to Carstairs, which meets the train with 10mins to spare. I don’t do it often, but it shows what comes of my easiest accessed station (Lanark) being on a branch.
Carstairs probably doesn’t justify its huge investment over the last 20 years (since it was first rebuilt) in terms of passenger numbers. But it does serve a vital purpose for a relatively isolated community. I stand by the “if you build it, they will come” philosophy. If Carstairs had a regular (hourly) Glasgow bound service (extending the Whifflet to Wishaw empties) with maybe alternate hours extending to Edinburgh, along with good secure parking and buses to Lanark, Carnwath and even Biggar, I contend that it would be a very popular station, as it has a huge hinterland.