It’s to do with the definition of primary colours in both cases. When looking at the light ones, mixing the waves of red, green and blue gives you wight light – these three are therefore called the primary colours. The normal primary colours (blue, red and yellow) are called this because mixing them gives you other colours – red+yellow=orange, red+blue+purple and yellow+blue+green.
It is important to understand the difference between coloured light and normal (i.e. paint) colours. When you see coloured light, say from a projector, red is made up of red wavelength light, blue blue wavelength light etc. However, when you look at red paint, what is happening is that white light (all wavelengths of light) are hitting the paint, but only the red wavelength light is being reflected. All of the other wavelength light is absorbed. So if you were to mix multiple coloured paints, eventually the paint will absorb all wavelengths and you will get black paint. On the other hand, if you were to mix red light, with multiple other coloured lights, the wavelengths would add, not subtract, and give you white light.