It's because the cone cells connected to those variants of colorblindness have very similar sensitivities to wavelengths. Check out this diagram: https://en.wikipedia.org/wiki/Cone_cell#/media/File:Cone-fun...
With protanopia, the L cone cell is affected. For deuteranopia, it's the M cone cell.