My Game of Thrones theory is that Samwell Tarly represents George R. R. Martin. Many authors represent themselves through their characters and Sam is him. You can especially see this in the scene where he enters the library in the citadel. Books were his refuge in his childhood, and he is Sam. Always the learner, rarely the doer. But the doers need people like Sam and it’s important he wrote himself in because it was his imagination that made it possible. I remember an interview he did where he recalled that he was pretty much a recluse as a kid and would watch the outside from his window atop the world. As such, it was his imagination that took him places and he invented whole worlds that no one could even dream of. It’s interesting then that Sam will be atop the world high in the citadel reading.