digital cameras process Red, Green and Blues and uses the luminance (brightness) between those three colors to "guess" the other ones, for lack of a better term (yellow, orange, purple etc). I think this is bayer filtering. It works like that because the human eye is way better at seeing contrast than the difference in actual color.
Green is usually used on scenes that are brighter because it just works better in the light and makes keying easier.. you use Blue in a darker environment because it has minimal color spill while keying
see the difference in the lighting?
iirc Blue was the industry standard back when everything was on film and the Superman films were the first to use green screens. but don't quiz me because i'm not too clear on all that
And to answer the question why they don't just use any color is because with Red there just isn't enough information, plus it clashes with skin tones and something like bright orange technically doesn't exist to the camera's eye