This ex post facto explanation is referred to as rationalization and is ironically irrational. If you’ve already made a decision you’ve forfeited the option to do so rationally.
I do agree that most of what gets labeled rational is in fact ex post facto rationalization. I do it myself all the time, haha.