This is an exception where English grammar was designed around practical needs, not the other way around.
"Code blue" is a phrase that is used in hospitals, when doctors and nurses need to immediately go to a patient to try to save the patient's life. There are a few other codes, also of similar urgency. That means that the term needs to be recognizable as quickly as possible.
- The most important part of the phrase is "code". The fact that a patient is "coding" means that each doctor or nurse in the vicinity needs to immediately re-prioritize what they are doing, and prepare to move elsewhere.
- The second most important part of the phrase is "blue". This tells each doctor or nurse the severity of the situation. Further information, such as where the situation is occurring, will immediately follow.
Putting the noun first and the adjective second allows the fastest possible recognition of an urgent request. (In just two syllables!) Using a code not only shortens the communication, it also prevents panic among those non-medical personnel who are not aware of the meaning of the code.
There are many other phrases that use similar words in the usual order, which do not have this sense of "Urgent -- be ready to interrupt whatever you are doing". For example, "blue pill", "red pill", "barcode", "security code".