Putting aside his potential legitimisation (and theories about his parentage), Jon Snow is a bastard. Because of that, there's the question of why it is Jon that Robb chooses to be his heir. After all, Ned had four other children, all of them legitimate. However, at the time that Robb makes his will, it is widely believed that Bran and Rickon have been killed by Theon, their bodies burnt and displayed above the walls of Winterfell. Arya, meanwhile, hasn't been seen since Ned was beheaded, and is also presumed dead. The whereabouts of Sansa are indeed known, but at this stage she's married to Tyrion, and naming her heir would mean Winterfell passing into Lannister hands. Of course, the Boltons use the Stark girls to their advantage. In the books it's a fake Arya married to Ramsay in order to help him claim the North, while in the show it's Sansa. However, if Jon has been legitimised, then he'll still have a greater claim than either of them, thanks to the sexist nature of Westeros' laws of succession.