If I remember correctly, the positronic brains in Star Trek: TNG couldn't be directly programmed. You could send in sensory input, and it would generate it's own neural pathways within; you could influence, but not control; attempting to control caused it to melt down or something similar. That's how Data created his "child". As for hardwired knowledge, such as the journals of the colonists that were downloaded into Data before he was originally such of by Soong, that could just be put into memory chips attached to the brain or body the brain is attached to.
So it's possible that the inorganic sentience is in the form of a computer system that can only program itself, but can be influenced in what it percieves, what info it has available, and presumably what motor functions are allowed. The Three Laws could be a computer chip just below the brain that monitors everything the robot does and attempts to keep it in line by stopping the "punch human in the face" command. Having this removed would be punishible by death by law.
As for why inorganic sentients would be built on purpose, a multi-purpose robot that goes around the house doing chores all day might seem like something a parent might want to be able to not be so scary to a kid. One way to do this is give it a personality, make it smart enough to carry out a conversation, etc. Now this might not in itself cause full-fledged self-awareness and "why am I here?"/"what am I really?" questioning, the "ghost in the machine" effect (I remember the doc in the I, Robot movie talking about this - yes, I haven't read the book) could theoretically do this.
Otherwise, a few rogue computer geniuses who want to take these robot's sentience to the next level might just go ahead and illegal modify them to make them completely sentient. Then begs the question: can the govt morally just destroy these now-sentient machines? They have feelings and fears the same humans now. Some (probably less than mainstream) religious individuals might even start saying that souls aren't restricted to flesh. That controversial stuff could just bring about a society where inorganic sentients are allowed to exist within certain parameters.
Beyond that, there is the whole urge to leave something long-lasting in the world so you can feel as if you'll continue to exist after you die. This might translate into creating an inorganic sentience that won't die of natural causes.
Regardless, it is possible for an accidental inorganic sentience to occur. Another Star Trek: TNG reference: In one episode, there were these tiny repair robots that had systems designed to adapt and learn to situations as they encountered various problems, rather than having to program each scenario possible into them and watch in horror as the one scenario you forgot kills you. Somehow, this resulted in them managing to develop sentience on their own. The "ghost in the machine" effect. Stuff that is intended to do one thing accidentally does another when combined. Sorta sounds like genes in mutations.
The original thread was for names, so here goes:
Inorganic Sentients
Positronics (if they have positronic brains)
And if you want them to give themselves latin scientific names (I used a latin dictionary
here and looked down the lists until I found something that seemed to work:
Anima Constructio ("Living Construct" - yes, this is inspired by the Warforged)
Perspicientia Exanimalis ("Aware Dead" - sentience doesn't seem to have a direct translation in latin)
Perspicientia Constructio ("Aware Construct")
Anima Exanimalis ("Living Dead" - decidedly more undeadish, but hey, it might work)
Hope this helps!