>>11627176back when they came out, the very concept of in-universe reason was not even a thing.
you were supposed to build your own reasons.
maaayybe just a general idea that the Star Trek series had color-coded uniforms, so Lego could benefit creatively from having more than one color, but there was nothing "official" about what colors they picked