I see it the other way around. If you have a short barrel you use a heavier bullet, and for a long barrel you use a lighter bullet.
A heavier bullet will limit the amount of powder in the case. The heavier bullet's powder will burn more completely in a short barrel than a lighter bullet's powder. If you consider two loadings to be equivalent, it's probably because the lighter bullet has more velocity to make up for its lack of weight - using the load in a short barrel reduces the velocity of both the heavy and the light bullets, but to a lesser degree with the heavy bullets.
In a long barrel, the heavy bullets powder will be completely burned long before it reaches the end of the barrel - a light bullet may easily have twice the powder (especially in something like .40 S&W a 180 grain vs 135 grain bullet) and get much more of a boost from the longer barrel than the heavy bullet will.
I'd say that in short barrel guns, shoot the heaviest bullet you can find. In a pistol caliber carbine, use a lighter bullet for the most ballistic improvement over a pistol.