I fail to understand why we are having this discussion.
It is entirely obvious to any intelligent railway user that guards on trains (all trains and that includes, inter alia, London Underground/Overground and similar operations) are absolutely essential for passenger safety and wellbeing.
In their absence, all sorts of things can and will go wrong and, as discussed above, the train driver/op will often be unaware of it. In contrast, the guard is generally in a position to do something about it.
The fact that a small minority of guards do not bother to do their jobs properly is utterly irrelevant (their mere presence on a train helps even if they are just lurking in a corner reading the paper). If they can collect some fares so much the better. That job is in any event better left to dedicated staff ie RPI's and similar.
The clowns that oversee the railways, be they DfT officials or TOC executives, do not get the point. A few experiential trips on selected late night services, for example, would concentrate their foolish minds. Particularly so if they stood 10 metres away from their seemingly unaccompanied teenage daughters. If they did, the entire bunch of fools would change their minds immediately. But they won't. And that is because the dunces have little or no consumer experience of the operations that they oversee. And that is just one aspect of what is wrong with the governance of the railways.