@freemo the difference is from technological advances in metallurgy and the change from black powder to modern smokeless powders
Modern ammunition designs just don't need anywhere near the same amount of case capacity to generate the same amount (or more) energy.
The .38 vs 9mm is a good example as they have roughly the same diameter bullet but the 9mm has almost ~30% more energy despite being ~30% shorter overall.
Some background info -
https://en.wikipedia.org/wiki/Chamber_pressure