'I never should have left the cupboard.' A young mister Harry Potter thought solemnly as he watched the dementor, not that the ten year old knew nor cared about the monsters name, bring it's foul face up to the boys, and began to suck.
Now, normally when a dementor pulls a soul from a body it only pulls a soul. As in singular. When this dementor began to suck the soul out of Harry, it also dislodged the soul fragment of one Tom Riddle as well. And this is where things get interesting. Magic is a living thing, constantly regulating itself so it does not hurt it's wielder and always searching for a way to help them, so it may live longer. It is bound to a magical beings soul when they are born, bound for the entirety of it's master's life, to protect and serve as best it can. So when something, say, a dementor, tries to harm it's wielder, it tries to fight back. That's why it takes a short while for a dementor to remove a soul and also why a soul glows while it's being removed, it's the magic fighting the dementors attack. And, unfortunately, magic always losses.
So when this rouge dementor tried to kiss Harry and accidentally dislodged Tom's soul shard, Harry's magic saw a chance to save both itself and Harry. Just as Harry's soul was about to be trapped forever in the dementors stomach, his magic gave an all mighty push and forced Tom's soul, which had been trailing behind, to take Harry's place. The dementor, having devoured a soul, was content and did not even notice Harry's stray soul floating three feet away from it and departed, heading back towards the prison it should have been at all along.
Now, one would assume that, now that the threat was gone, Harry's soul would simply return to his body and everything would go about as though Harry was never attacked by a rogue dementor, that he would crawl back to number four and go back to his cupboard and pretend the whole thing was a nightmare, and make a solemn vow to never run away again. No matter how tempting it would be.
But thats not what happened. Magic, as stated before, is a living thing. It wants to protect it's wielder from all harm, so as to live longer itself. And like all living things it wants to grow, to expand. However, the human body can only handle so much magic before it starts to fall apart, and humans can only live so long. So, free of Harry's mortal restraints and with the poor boy being just a soul, Harry's magic was free to . . . 'better' the boy to its liking.
The first, and most important, thing that the magic decided to do was find a host for it's young master. Something durable, something that would last, yet still be able to be transformed as the magic wished while it still had so much control. But it would also have to be something that would allow the magic to grow and expand further than the weak human body it was formerly housed in allowed. The body would also have to be able to keep it's master safe.
And it would need to find something soon as it's master was slowly fading the longer his soul was without a body. The magic scanned the area around itself in an attempt to find a proper host for it's master. It quickly dismissed anything organic in nature, as Harry would most likely burn through the body to quickly and leave the boy worse off than he already was. The magic gave serious consideration to a large boulder in the park near where the dementor had attacked it's host. It could easily shape the rock into a golem and it would last a great deal longer than any human body, but dismissed it as the body would be far too slow for the magics liking and would also be an easy target for muggles, what with Harry not being able to hide easily in such a body.
'Hide. Now theres a thought.' The magic thought, or rather, did it's equivalent to thinking. One more quick scan of the area revealed an old motorcycle half hidden in a near by houses torn up and rather unsavory front yard buried under a pile of black trash bags and weeds. With a quick burst of itself, the magic levitated the motorcycle out from under the trash and set it before itself. With a bit more of it's influence the magic repaired the bike back to pristine condition. With a quick once over, the magic was satisfied.
The metal was sturdy and even in the poor conditions it once was in it had held strong, and would have likely lasted years longer before falling to rust due to neglect. It was also a common make, as the magic could tell having located ten like it within a range of five city blocks. Yes, the magic decided, this would make a perfect base. Though for its purpose it would take some modification.
Reaching out to the bike, the magic began to get a feel for the man made construct, to know what it was capable of, and then pressed it's will upon the machine.
Though magic may not care on how it's master looked, it knew that ones form was important for it's master, and thus, with a sound of protest from the bike in the form of the sound of metal scraping on metal, it reformed the bike, though it 'memorised' the original form.
Ironically, the bike the magic had chosen was of the same make as a bike that had already had a great impact on Harry's life. The Triumph Bonneville, the same type of bike that Sirius Black had lent Rubeus Hagrid the night young Harry's parents had died. And now it would house the boys spirit.
When the magics work was done, what once was a simple motorcycle was now a vaguely humanoid robot. It had two legs and arms, hands, feet and torso with a head on it with two currently dull eye's, but it was all made from the metal and plastic of the black motorcycle. Though, two be honest, the only parts of the motorcycle still easily recognizable was the two tiers sticking out of the robots back.
With a form done the magic worked quickly to get all of the 'perks' worked out of the way before it's master could fade even more. It enchanted the body to stay clean, and reinforced the metal as much as possible, while also putting in the knowledge of how to return the robot to it's bike shape and vice versa, into the robots head, along with a number of other things.
No point making it's host this nice body if he's just going to get it blown up, no?
As it finished, and prepared to insert it's masters soul into the machine, the magic made one final change to the body, a change that would help his master with his greatest desire.
He gave the boy the power to create others like him.
And then the magic settled it's master soul, his very being, into it's creation, and once more settled into the background, awaiting it's masters orders.
With a flicker of it's optics and a groan the machine that was now Harry Potter came online for the first time.