I agree with sonak's transporter ghost. It's not possible for a sentient being to be devoid of all emotion. You can attribute his apparently emotional behaviour, say his self-preservation instinct or his loyalty, to a "program", but then you're depriving him of sentience in that area. If he's only loyal because he's programmed to be loyal, then he doesn't deserve the credit for it, surely.
As for what the writers intended, that's a different matter. We were constantly told Data lacks emotion or humanity, but he frequently adopts human mannerisms. Think about it: if you met Data would you consider him inhuman, or just a little rigid? I think they were ambiguous on this. But by Redemption II they must've been trying to suggest that he apes human emotions when called upon to do so.