Character detail for bit parts is an extra, not a must. If it fits the mood and flow of the scene, it works, otherwise it just needlessly bloats it and breaks the pacing of the whole thing. Characters not having fleshed out personalities beyond the role they play in the plot is something that happens in media all the time, especially when the serve as momentary obstacles for the heroes to overcome.
And mind you, the security guard from Babylon 5 wasn't written to hate TV to give him a bit of a personality and make him seem "more realistic" as an example of Joe Straczynski's focus on realism and attention to detail, as though an ICE agent being a dick to undocumented immigrants is not realistic enough. How many people do you encounter whilst doing their jobs whose personalities you also get valuable insight into? That Earthforce guard was specifically given that line because JMS knew it would be said to Jerry Doyle who was a far-right talk radio host in real life who subscribed to that exact kind of ideology, and annoyed JMS enough with his constant preaching that he wanted to get back at him. And it wasn't even the first time it happened on Babylon 5. EDIT: and, for the in-story reason, he was made to hate TV because Garibaldi's whole ruse hinged on the fact that he was all over ISN Network News as the hero who captured the traitor Captain Sheridan, and they needed a guard whom the ruse wouldn't work on. As an obstacle for him and Franklin to overcome.