You have named two powders that are somewhat unrelated. The first, H4895, is a medium speed rifle powder. The second, AA#5, is a medium speed handgun powder.
In general, the burn rate for rifle powders is much slower than for handgun powders. There are some powders with a burn rate that bridges the two groups - IMR 4227 and 2400 come to mind. A caution: Experimenting with handgun powders in rifle cartridges can lead to rapid disassembly of your rifle.
You try to choose a powder with a burn rate (within the proper category) that will fill the case sufficiently without causing too high, or too low a pressure peak depending on many variables such as caliber, bullet weight in that caliber, velocity desired, etc. As Kimber1911 said, if the burn rate is wrong you might have too little in the case which might cause an uneven burn. It depends a lot on the powder type, composition, and primer.
How a burn rate affects accuracy is kind-of up in the air. There are many variables that affect accuracy, burn rate is one of the minor ones. As I said, if you have sufficient powder in the case and the powder is proper for the case/bullet combo, the other variables are more important.