"I was in the Outland areas. Many of the droids would fall apart very rapidly. I was lucky to be totally reassembled by a young boy working for a junk dealer." C-3PO
How did a child, even a extremely powerful one born by the Force, manage to build a factory-spec protocol droid from scratch? A way to avoid this contrivance is to take the claim young Anakin's just built a droid as a nine-year-old-trying-to-impress-the-hot-girl-he-just-met hyperbole. Thankfully, the often film-faithful Expanded Universe has ran with that argument, saying C-3PO was a mass produced droid whose remains Anakin found and did up. One of the stranger shoehorned elements of the prequels, explained with logic.
Except it's not the fans, but Lucas, who came up with this solution; that's the backstory originally envisioned for 3PO. I'm not even kidding; in 1977 Lucas said that C-3PO was rebuilt by a young child. Nowhere does it say it was Annakin (the early name of Luke's father) or Darth Vader (remember, different people at this point in the story), but it's still an oddly specific prediction.
As pre-Episode I Threepio has little influence on the story, much of what Lucas wrote all those years ago about his origins has become canon as the character's backstory. According to the Star Wars website databanks, the droid is 112 years old at the time of Episode IV, exactly what was originally stated.