How did madam c j walker get her middle initials?

Charles Joseph Walker was Sarah Breedlove's (aka Madam Walker) third husband. When she married him, she used his initials in her name.
Source: On Her Own Ground: The Life and Times of Madam C. J. Walker by A'Lelia Bundles