Why do you get yellow when mixing red and green light?

When it comes to light, green is a primary color and yellow is the secondary. I cannot explain why this is, but it is how it works (Possibly because it is about transmitting light and not reflecting, but that doesnt explain why red and blue stay the same)