Gunpowder has two major components. Single-base powder is made with nitrocellulose. Double-base powders add nitroglycerine. Both of these are organic compounds made by a chemical reaction of several different ingredients. Unfortunately, organic reactions rarely proceed to 100 percent completion, so there may be little differences in the product every time it's compounded.
Primers are also chemical mixtures subject to variability.
The manufacturers do an incredible job of controlling these processes. There will be a range of velocity. In fact, it is very rare to see exactly the same reading on any two shots within a 10-shot string. When we make an incremental adjustment of the powder charge when working up a load, the first thing we have to figure out is whether or not there really is a difference. Even though standard deviation may not be the best guide, it allows a reasonable guess.