The secretary of defense attempted to convince the president right until the last minute.
Trump does not believe in enduring alliances, does not believe in shared values or the importance of history. For him, everything is purely transactional, everything is pecuniary.
Notably, he neither thanked Trump nor offered him any praise. If you can't hear the alarm bells ringing, you'd better get your ears checked.