I think stunted growth depends on the exact type of fish in question, some fish seem more prone to it than others, and for different reasons too.
I know that with red tailed catfish, their growth is very difficult to stunt if you keep them in good water quality conditions and on a good diet, they will just keep on growing and growing, even if they can't physically turn around in the tank.
Bad or less than desireable water quality can stunt the growth of many types of fish, but the water quality does not always need to be "bad" to stunt a fishes growth- i know that with clown loaches for example, even if there are no nitrites or ammonia in the tank, if regular water changes are not done then this will stunt the growth of the clown loach.
I'm not sure exactly why this happens with clown loaches, athough i suspect it has something to do with the mineral build up in the tank from lack of water changes- in the wild, many fish which live in waters whose conditions change dramicatically at various points in the year, like during a dry season and wet season. Many types of fish stop growing as much as the dry season progresses- I think they detect the build up minerals in the water that naturally come about as a dry season progresses, and this triggers the growth in the fish to slow down, since this would have many benefets during a dry season where there isn't much food and space to swim around in as the lakes and rivers start to dry up.
So not doing enough water changes may trigger the fishes dry season survival response, and the fishes stunts its growth- doing lots of water changes would make the fish think its living in a plentiful wet season, and so it continues to grow at a normal healthy rate etc.
I think people should always give fish a decent sized tank and habitat though regardless of stunted growth issues, because of welfare/welbeing issues of the fish concerned. Because water quality conditions also seem to play a large part in many cases of fishes stunted growth, it is also very important to do regular water changes, to keep the water quality good and prevent excessive mineral buildup and to also reduce background levels of any diseases/parasites lurking in the water etc

.
Another very basic cause of stunted growth in fish, although mostly seen in the larger growing fish, is people simply not feeding their fish the right foods or enough of them- i have seen so many tankbusting or large growing fish like common and sailfin plecos, bala irredescent sharks and oscars etc that have not grown as large as they should because they were not fed a good diet.
I have to admit myself that in the early days of my fishkeeping hobby when i did not know as much as i curently do, i probably didn't feed my plecos as much food as i should have fed them (of course now days i do).