Aren't all androids in the franchise (especially in the movies) a slave to their programming?
Usually that is the impression I get on them.
So, David's simulation of human consciousness is supposed to be more complex
David's simulation of human consciousness isn't like the others. Weyland didn't want just a machine that follows orders, he wanted a son. David's simulation was made too human. In a way he is a slave to that programming, his actions are a result of that, the contradiction of a very realistic simulation of man's mind on a plastic body. Someone forgot to consider that. Plus when the Engineer ripped his head, maybe some stuff got screwed.