I bought a couple of the 9mm pins for spares as I shoot my G34 in USPSA competition & don't like doing ANY kind of racing without spare parts.
That said, if you compare the 9mm & the .40 firing pins carefully, one (forgot which) has a slight bit more protrusion of the actual firing pin section than the other does. Not a lot, maybe .010" or so. Overall length is the same for both.
Don't have any idea why, they just are.
NRA Endowment Member, NRA Certified Instructor for Rifle & Pistol, Illinois State Rifle Assn. - Life Member, GSSF Life Member,N.R.O.I. level I, IL Glockers #34
G: 19,20(x2),21,22,23(x2),24,27,29,34,35 & 36 (still counting)