Usually, people talk about rationalization ("the act, process, or result of rationalizing : a way of describing, interpreting, or explaining something (such as bad behavior) that makes it seem proper, more attractive, etc" https://www.merriam-webster.com/dictionary/rationalization) in a negative context: a person does something bad, or at least does it out of reprehensible motivations, but then rationalizes his act, bringing worthy motives under it.
But recently I have come across the rationalization of good behavior, through selfish motives. In other words, a person is not free to do good things, and they need a selfish motivation to look practical in their own eyes. For example, a person donates clothes and other things to an orphanage and says that they do it for their own sake, because they have a system of biological encouragement for socially positive actions. But he innocently forgets that it was not in his will that such a system of unconditional encouragement was laid down in him by evolution. Or a person becomes a vegetarian, not for ethical reasons, but because it is "good for their personal health".
That is, some inherently good people are so dependent on a certain layer of culture that forbids them to do altruistic actions of their own free will that they are forced to rationalize good actions by saying that these actions are in some way beneficial to them personally.