I don't think the GameCube failed, it sold well amongst its target audience (kids).
If you mean why wouldn't someone like me buy the console, IMO it was ugly to begin with, feels too much like a kid's console, not enough mature orientated content nor additional features, even if you think the console was more powerful than a PS2 it still provided weak technical specifications and IMO Mario Sunshine sucks compared to Mario64.
Pricing usually is less of a factor to me, but if I had kids I may have bought them a GameCube.