Why does my boyfriend lie when doing something nice?

My boyfriend and I have been dating for three years now he's a pretty quiet guy who I love and I know has my back what I find odd is if he does something selfless he'll immediately say a fake selfish reason for his action. For example if he donates to charity he'll claim he just did it as a tax write off or if he sees a homeless person he'll get them some food and a hundred bucks usually his reason. I like sleep ya think my conscience would ever let me sleep properly again if I didn't help the person? He's a nurse who always deals with scared kids when it comes to getting shots he will let them watch cartoons on his phone so he can inject them his excuse. Makes it easier to do my job when they ain't squirming. I love him and he's a pretty nice guy but I don't know why he feels the need to do these things.

Updates
1 y
I have attempted to ask him why but he'll usually find a way to change the conversation he's very good at working a situation.
Why does my boyfriend lie when doing something nice?
Post Opinion