It follows that it should be perfectly possible for an A.I. to do this, too.
(Edit: I now realize that this rationalization process was theorized by Douglas Adams in Dirk Gently’s Holistic Detective Agency, as described by Wikipedia:
“The story also mocks the corporate world with [the software] package called Reason, which inverts the idea of a decision-making program. Instead of proceeding from ideas and logic to a decision, it takes a decision that has already been made and creates a reasoned justification for it.”
— https://en.wikipedia.org/wiki/Dirk_Gently%27s_Holistic_Detec... )