To understand what effect changing those colors have, you'll need to understand how ANSI colors work.
In the early days of ANSI escape codes for coloring, the specification allowed programmers (or other users) to write codes for choosing between 8 colors (black, red, green, yellow, blue, magenta, cyan and white). As a kind of defacto standard terminal makers also allowed for choosing brither versions of the same colors (i.e. bright black, bright red, etc.).
The actual color of "red" or "green" isn't standardized and vary between terminal software. These are the colors that Apple lets you redefine. I.e. if you want your "red" to be more or less red (or something else entirely), it will let you.
Later on work has been done to expand on these escape codes to allow a wider color range. In the ISO standard version of these escape codes it is possible for the programmer to select any 24-bit RGB color by issuing an escape code that specifies the amount of red, green and blue that goes into the specific color they want.
This means that if you run a program in the Terminal that is using the old set of escape codes that reference color "names" (i.e. red, green, cyan) - you can change what those color references mean in the preferences.
However, for programs that use the newer escape codes that reference specific color codes (i.e. rgb(123,74,101)) the programmer has already explicitly asked for a specific color - and you're not able as a user to change that from the Terminal preferences.