What problem does it solve?
The Stroop effect is one of the most replicated phenomena in cognitive psychology: when a color word is printed in a different-colored ink, the meaning of the word interferes with naming the ink color, and reaction time jumps by ~50–100 ms. It is the classic index of cognitive control — the ability to ignore irrelevant information and stick with the relevant one.
Practicing Stroop seems to sharpen selective attention in the moment. Whether it transfers to other inhibition tasks is debated (see Limitations below).