Ko,
The key is Rocky's parenthetical "within reason". I have a reference to a 1954 publication in which rifle ammunition fired in a very short barrel was shown to bulge the bullet base, ruining accuracy. In other words, peak pressure is so great the muzzle blast can actually deform a bullet base if it runs out of barrel near that peak.
Grapenuts,
To answer your original question a little more completely, no, the powder does not all burn in that first few inches. Peak pressure is reached then, however. That is due to pretty much all of the powder having started burning and being actively contributing gas to the pressure at that distance. Many powders that are slow enough will still have a few percent trying to finish burning when the bullet exits.
Going to a faster powder accomplishes several things. You will increase ballistic efficiency, the percent of the energy stored in the powder that is converted to kinetic energy in the bullet. In connection with that, you can't put as much stored powder energy into a case with a fast powder because it would create too great a peak pressure, so you generally end up using less powder by weight and save money. You reduce the pressure at the muzzle, which has several benefits: it reduces muzzle blast, it reduces recoil, and it reduces the amount of blast-propelling on the base of the bullet that can exaggerate errors due to bullet base or muzzle asymmetry and any bullet out-of-balance condition.
The muzzle blast effects take some further explaining. The effect on accuracy happens because muzzle and bullet base symmetry ensure the blast acts uniformly on the bullet base as it exits. Without those, the blast will start to escape from one side of the bullet base before the other and the bullet will be slightly tipped by that, which the bullet has to recover from in flight. Additionally, if the bullet mass is at all eccentric, after leaving the muzzle, instead of continuing along a trajectory in line with the bore axis, it will start to spin about its center of mass instead. The shift from spinning on the bore axis to spinning around the center of mass is called bullet jump. That is because the bullet moves over slightly to find that new rotation axis. During and after the jump, the bullet is no longer quite centered over the muzzle blast, and so, again, it can be slightly blown off course or tipped by the asymmetrically applied pressure. It's one of those things that wouldn't matter if every bullet had same error and started out oriented so they jumped the same amount and in the same direction every time, but that isn't how it works.
The recoil difference is due to two things. Half or more of the powder gets blown down the tube with the bullet, plus the evolving gas has no less mass than the powder generating it (mass can neither be created or destroyed except in nuclear reactions), so the more powder you put in the case, the more recoil you have from accelerating its mass down the tube. The more significant effect, though, is rocket effect. That is the rearward propulsion of the gun due to the rapid acceleration of the mass of the gas in the barrel once the bullet exits. So this is a push that occurs after the bullet is clear of the muzzle. It can be responsible for up to 40% of total recoil. Venting muzzle pressure before the bullet clears the muzzle is how muzzle brakes reduce recoil even when their holes just vent sideways and equally in all directions. If you have a smaller charge of a faster powder that produces less gas mass and exhausts out the muzzle at a lower pressure, you can cut the rocket effect down. In another forum I once helped a fellow looking for a low recoil load for his kids reduce the recoil of his light load from 14 ft-lbs to 11 ft-lbs just by changing powders, but not giving up any bullet velocity.
The drawback to a smaller charge of a faster powder is it will usually leave more empty space in the case. That can reduce ignition consistency, so it isn't always the best thing to do. The fact you are lowering muzzle pressure also costs you some velocity. You end up having to decide what trade-offs are suitable in your gun?