This goes back to the original series and doesn't make much sense. Supposedly "operations" officers wear the same color (red or gold, depending on what century we're in), but it seems to me it would've made more sense to make security and engineering distinct from one another. What exactly keeps an engineer from being mistaken for a security officer and vice versa?
On TOS they had no budget and reused or redressed everything. Pretty much this is where it started and it was carried on in later renditions of "Star Trek".