Droids are ubiquitous in Star Wars. They are used for all kinds of things, including skilled labor, not just simple automation. Ubiquitous implies cheap and easy to construct, while skilled labor implies sophisticated data processing capabilities. That's a pretty weird combination if software doesn't exist and everything is done in hardware. Plus there seems to be a complexity gap, where you jump suddenly from fairly simple embedded systems all the way to full-blown automata. What's going on here?
The answer I came up with for my RPG is that there's something strange going on with digital computation.
Past a certain level of complexity called the Vaasi Limit, digital computation in Star Wars becomes unreliable. That is, you can construct a Universal Turing Machine, and in principle it ought to work. In practice, if you try to use a UTM to do anything complicated, transient and unreproducible errors occur start popping up so frequently that it becomes useless. This explains why the embedded electronic systems we see are fairly simple: if you make them fancier, they stop working.
Fortunately, there's a second level of complexity, the Arden Threshold, beyond which any collection of digital circuits will pretty reliably begin to exhibit thought-like behavior and dynamics. This is how droid brains are built: you just cram as many circuits together into as small a space as you can, and the resulting conglomeration automatically wants to do thinky kinds of things. (Thinky things of a certain minimal degree of sophistication, which gives us that complexity gap.)
This means droid brains are cheap and easy to make. You don't need massively complex design or ultra-precise manufacturing, all you need to do is exceed the Arden Threshold. The only trick is getting the result to do something useful. Housing it in a specialized body with sensory inputs and manipulators suited to the chosen task is a good first step. You can also instill behavioral predilections through certain architectural patterns in the circuitry. Beyond that, "programming" a droid is mostly a matter of filling up the memory banks with useful information and applying conditioning matrices to create response imperatives. It's a lot more like training an animal than it is like writing code.
So what causes the circuitry to behave so differently from the real world? It's the Force. The Force is a pervasive energy field that responds to thought patterns by creating kinetic, electrical, gravitic, and other effects. How exactly that works I'm just going to ignore, but it's easy to imagine the informational processing of a UTM being sufficiently thought-like to cause small-scale "ripples" in the Force that would, in turn, affect the state of the UTM in a non-local way. (Which makes it really hard to program, and even worse to debug.) But get enough of those thought-like patterns happening and harmonic resonances amongst those little Force ripples will kick off a feedback loop that causes the circuits to synergize into a coherent system that wants to think. Voila: droid brain.
Now, droids can think: they can process information in a reasoning and intelligent way. That makes them sapient. But are they sentient? Do they have awareness, desires, emotions, a sense of self? Are they conscious and self-aware? I think the answer is no.