A word to describe doing "good" things for "bad" reasons

Solution 1:

Something done with an ulterior motive perhaps fits what you mean.

Although it's not specifically about the morality of what is done (right/wrong), it's done with a, usually hidden, often selfish, real reason which differs from that which was professed.

He got his wife membership of the country club with the ulterior motive that she might meet someone else to ease the guilt he felt at planning a divorce.