Was David's behavior consistent with his design and his loyalty to Peter Weyland (even after the latter's death) or due to some malfunction?
Is it implied that David's mind is based on Weyland's and that this accounts for his extreme behavior -- not a malfunction but how Weyland himself might behave?
(You will recall that he was willing to have Shaw shot if she interrupted further as just an example.)