The "D" originates from a old royal family, even old then the celestial dragons. They were overthorn since then, and each child born with the will of "D" are blessed with the power passed down from the original "D" just a guess. I don't know.
More like the D. originates from the Kingdom the 20 countries fought against during the Void Century. That's my best guess. Or something with JoyBoy.
And Luffy's mom is….
!