The story of Game of Thrones is, in a sense, a "recent history" of Westeros. By that, I mean it chronicles the events that were the beginning of the end of Robert Baratheon's reign and record everything that happened leading to the first elections in Westerosi history. Like author George R.R. Martin's two-part Fire & Blood, which covers 300 years of Targaryen rule, this is a book that could easily have been written by someone in the Citadel, and apparently, it is. But why wasn't Tyrion mentioned in the A Song of Ice and Fire book?
Fans have wondered for years if the A Song of Ice and Fire series actually existed in Westeros. Part of this is in hopes that it proved certain characters survived. For instance, if Sam Tarly wrote the history of the chaos that reigned when the second Long Night returned, that would be he survived said chaos.
For the show to confirm that indeed, there is a book called A Song of Ice and Fire in production as Game of Thrones finale draws to a close is, therefore, a bit of fan service, especially having Sam be the one to bring a copy into the Small Council meeting.
But fans were perplexed when Sam admitted Tyrion, one of the main point-of-view characters to survive all the way through to the end of Martin's story, is not included in its pages. How could that be?
In fact, Tyrion shouldn't be hurt or upset to learn he's not in the story. After all, Varys already told him he wouldn't be.
As Tyrion lays in his bed recovering from nearly being murdered on the battlefield, he is told he will never be featured in the history of Westeros.
There are many who know that without you this city faced certain defeat. The King won't give you any honors, the histories won't mention you, but we will not forget.
This is the kind of power Tyrion has always wielded, the kind he agreed to at the beginning of the second season when he is first put in charge as Hand of the King. Power is a trick, it lies where men think it does. A lot of times, men are mistaken as to where that is. While the world was looking at Joffrey as king, Tyrion was the one working to save Westeros. While the people suffered under Cersei's careless rule, Tyrion was working to bring Daenerys back to Westeros. While they were mesmerized by her dragons, he was doing everything he could to make sure they didn't burn.
Tyrion wasn't always successful, but since no one was looking at him, he could be named Hand of the King three monarchs running. After all, once again, everyone is looking at the kindly young man in the wheelchair who seems a fair and just king. No one realizes the fate of their trade with the North, their goods, and their entertainment their city provides is determined by a room full of men in the back, with Tyrion running those meetings.
No one writes Tyrion into the history of Westeros because they don't know he's there. He's just a shadow on the wall.