I prefer to think of this as a guideline. It works in some cases, but in others it doesn't.
It does concern swimming room to some extent, but some fish are more or less aggressive than others, or require larger swimming areas, so this can be modified. For example, guppies are small, yet it is suggested that they be kept in a tank no smaller than 20g.
It also concerns bioload. No matter how good your filtration is, it doesn't actually remove waste from the water, it just turns it into something less toxic. Less toxic, however, doesn't mean non-toxic, and fish will eventually suffocate in the by-products of this waste conversion. The smaller the tank, and the more fish in it, the faster this will happen.
There are a few things that will break the guideline. Particularly large critters have a vastly increased impact and particularly small critters don't have terribly much effect on the bioload. For example, I probably have about thirty inches of small Malaysian snails in a 10g tank, in addition to the three inches of
betta in the tank. But waste production really has more to do with mass than length, and there probably is more mass of betta than there is of snail. Conversely, large fish, such as an oscar, or fish that have more mass per inch, produce far more waste than their inches would suggest (this fish also usually need more swimming room).
Another factor is type of fish. Depending on general diet and other things, some fish produce more waste than others.
goldfish, koi, and plecos, for example, are all very messy fish.
I usually consider the guideline for more common aquarium fish, tetras, mollies, cories, otos, bettas, platies, etc... When you get into bigger fish like oscars, large cichlids, and such, they require far more research and care, and a simple, "lazy way out" guideline like this really doesn't cover it anymore.