His car broke down several dozen kilometers from a town, and he knew that. He chose not to go back on foot, because he didn't find that fun, and he wanted to have fun. He's a mechanic and tinkerer, went there on holiday, the military turned him around, so he found something else to do: build a motorbike.
In a subsequent trip he turned the same car model (Citroen 2CV) into a floating barge, just to cross a river. He could have crossed that river farther away in a multitude of ways, but this is his idea of fun.
tl;dr: guy can walk back to civilization in a day or two after his car breaks down in Morocco, he chooses to build a motorcycle from car parts instead.
Why? For fun.
Edit: I feel that reading the full story on the original site (in French) dispels much of the doubt.
Also, at no point it was really an emergency as he had ample rations.
12 days. In the desert.
I doubt this dude keeps two weeks of water in his trunk.
https://maps.google.com/maps?q=Tan-tan&ll=28.357568,-10....
One having 12 days of drinking water in his trunk is anything but shocking for the area.
Also the motorcycle ain't awesome at all, only one gear with a crappy transmission, making it a barely practical contraption.
Finally, in a few of the pictures the supposed engineer of this contraption is shown in a thong. I don't know about you, but if I were in an arid place the last thing I would want is my skin exposed to sun and the air.
It may be a real motorcycle, and that's cool, but it's very unlikely it was built under the conditions discussed in this article.
My co-founder survived in the Desert for 52 days after crossing the Gobi Desert entirely on foot in 2011. Not all deserts are 50C every day and explorers can be quite hardy. Also, they often wear clothes to cover all extremities, including gloves to cover fingers.
It's near a coast too: http://news.ycombinator.com/item?id=4007858
Also, if he was concerned about theft by the locals, that means that there were other people around from whom he could have obtained water and food.
EDIT: It seems that this did happen right next to a river [2]
[1] http://en.wikipedia.org/wiki/Henley-on-Todd_Regatta [2] http://chameaudacier.free.fr/bato1.html