The way our brain interprets colours doesn't map super closely to how the physical spectrum is laid out.
There are numerous ways to display the spectrum in ways that make more sense. One of them is the 1931 colour space:
(From Wikipedia)
All of the numbers along the edge correspond to a single, pure wavelength. Adding wavelengths together result in one of the colours in between, depending on the balance of each wavelength intensity. You can see that if you have an LED right at 560nm (green) and another LED right at 580nm (orange), then combined, they will appear yellow. Same thing with 560nm and a smaller amount of 600nm(red).
Side note, you will also get yellow if you have a single LED at 570nm. This is distinct from the previously discussed, but your brain won't be able to tell the difference - This is called metamerism.
Following this exercise through, if you mix a combination of 540, 600, and 480nm together, you'll hit that white patch in the middle. This is the basis of how your monitor works, using only a gamut of RGB.
Given this mental model, it's easy enough to see how you can achieve yellow using green and red, and why blue 460nm and red 600nm eventually reach magenta shades.