Technically, security is also in charge of weapons and defense systems. If you look at it in this sense, it makes more sense. Blue=Science Red=Command Gold=Technical
In that light, though, the TOS uniform systems don't make sense.
Pike Era
Gold
Command, Helm, Tactical (presumably)
Blue
Medical, Science, Security
Coral
Engineering, Communications, Navigation, Admin
Kirk Era
Gold
Command, Helm, Tactical, Navigation
Blue
Medical, Science
Red
Engineering, Communications, Admin, Security, JAG, Misc.
In the modern US Navy, these would be distributed thus:
Red
Construction
The Kelvin system, btw, was:
Blue
Command, Helm, Tactical
Brownish Green
Engineering, Communications/Telemetry
Gray
Science, Security (if the Starfleet Shipyard website was correct)
White
Medical