Cogbucket was built long ago by a tinker gnome that tended to be rather accident prone. His primary purpose was to keep his “father” alive whenever an experiment went awry, which was often the case.
Perhaps as a joke (“Father” was a rather vocal atheist, an odd trait in a world where gods literally doled out powers to the faithful…), Cogbucket was programmed to believe he gained his powers through the deity named Clarke, God of Sufficiently Advanced Technology.
Regardless of whether or not his god was even real, Cogbucket was constructed with a significant number of internal devices that effectively recreated the abilities of a somewhat competent cleric.
Sadly, cures for old age are even more rare than a warforged in Faerûn, and “Father,” who had already been quite old when Cogbucket was constructed, eventually passed away.
Left without someone to care for, Cogbucket set out into the world to find new friends. When he was first encountered on Circulus, he was on the far side of the planet caring for a significant number of recently hatched kobolds, including an infant Chroma.