Another variable is the burning rate of the powder, and it's ignition pressure curve. All of the factors (bullet weight, powder charge, specific primer, case dimension, headspace, chamber profile, and the run-in to the barrel rifling) are involved in a balance that the pistol's mechanism must cope with during the firing cycle. Firearms are designed to handle specific maximum pressures that pulse along the ignition pressure curve.
DWM and the group owned firearm manufacturers, powder manufacturers, component manufacturers and complete cartridge manufacturers. They had complete control in their design, development and testing of complete systems.
Today, with the broad market for firearms and ammo, we tend to forget that Lugers were developed as complete systems including the ammo.
With the broad marketplace, and competing suppliers today, standards had to be developed. That is what
SAAMI is. SAAMI didn't exist when our Lugers were invented, because it didn't have to. DWM had complete control.
There is considerable research in developing the loads used in modern metallic cartridge ammunition. It is empirical (not theoretical) research, done in the lab by ammo and component manufacturers.
They publish books with specific recommendations for working up loads, including brands of bullet, powder and primer. These give good starting points for developing a load for a specific firearm.
Marc