Keffer was supposed to be there to represent the "grunt's eye view" of the station, as opposed to the command-level characters that we usually spent time with. This was the same notion later explored in 'A View from the Gallery". But JMS never really got a handle on the guy and it showed in the writing. (And JMS has said as much.) Keffer was also supposed to be killed, eventually, so JMS just got rid of him at the end of the season, since he had served his purpose.
With his trap-doors and flexibility in using characters (with one or two exceptions), JMS has said that as he got to the end of each season he'd consider killing off pretty much any of them, to see what that might do for the overall story. So almost nobody was "safe".
But it is interesting to note that when JMS was struggling with what to do about Sinclair as S2 approached (since he had realized that having the commander have a close, personal connection to the Shadows was too much to sustain) he briefly considered using Keffer in that role, which would have kept him alive for another season or so. (His other candidate was Garibaldi, one reason we were introduced to Lise Hampton early on.) Ultimately he decided to introduce a new character for that purpose, who became John Sheridan when the decision was made to replace, rather than augment, Sinclair.
Regards,
Joe