Janitors provide no added benefit when on your ship. On the ship they simply hold a broom and walk around aimlessly.
Janitors which wield a dagger have no ranged weapons, so they must close the distance before they can begin to hurt enemies; this makes dagger-wielding janitors somewhat similar to mechanics (crew members who also lack ranged weapons, only being able to attack in melee range with their wrench).
Conversely, janitors which wield an assault rifle have no melee weapons, so they will not attempt to close the distance while their gun is on cooldown; this makes assault-rifle-wielding janitors somewhat similar to penguin mercenaries (crew members who alternate between two pistols, refusing to engage in melee combat).
In conclusion, janitors are a special type of combat support which, rather than switching between melee and ranged weaponry like soldiers, outlaws, and non-combat crew members, specializes in either melee or ranged combat depending on whether they generate with a dagger or an assault rifle.