>>13120780I like to interpret Honedge as being a sword that gained a soul, similarly to Tsukumogami legends from Japan. Honedge is nothing until the it comes to life. It eventually becomes self aware through unknown means (possibly environmental, a bunch of swords laying in that creepy ruins area of Kalos were exposed to mystical energies and boom).
Also, we shouldn't take ghosts as literal ghosts. They're pokemon, and their strange qualities and attraction towards places of death have lead to folklore describing them as actual souls of the departed. One of my favorite theories about a ghost pokemon is that Gastly are actually formed from the gasses released from decomposing bodies, leading to humans to say "well, it must be that dead thing's spirit rising from the body."
I also believe pokemon have mild matter manipulation abilities (evident by their abilities to summon rocks and shit and throw them at stuff) and can use this ability to reproduce, forming pokemon in their image.