Molecular differences in the HB graphite hardness scale
Pencil leads are not comprised of pure graphite: they're made from graphite and a varying amount of clay, which in turn is what determines the hardness of the lead. Thus, you're not actually comparing graphite to graphite but rather different mixtures of graphite and clay.

According to one article published by Jetpens.com (a vendor of writing implements) entitled Picking the Perfect Pencil Hardness Grade:


  Graphite is the key component of modern day pencil lead—in fact, lead is a misnomer as it's actually made up of a mixture of graphite and clay. The formulation of this mixture determines its lead grade. The higher the proportion of graphite content relative to clay the lead has, the softer and darker the lead will be, and vice versa.


And Wikipedia tells us:


  The various graphite pencil grades are achieved by altering the proportion of graphite to clay: the more clay the harder the pencil.


The difference in hardness is attributable to the amount of clay mixed in with graphite in your different pencil leads. There is no difference in the graphite at the molecular level.