The scene at the end of TFA is from Rey’s perspective. So it’s epic and momentous - here’s me offering this legendary lightsaber to this legendary person to ask him to save the galaxy. Whatever happens after that doesn’t change the emotion of that moment.
In TLJ, we get a twist on it by seeing how Luke really feels about the “legendary” label. And Luke talks about his feelings about being a legend later in the film - the label is a burden, it caused him great pressure and great shame - it is the reason he has brought himself into exile. In that moment, he’s thinking that that lightsaber brought him terrible emotional and physical pain (remember the last time he saw it?). He doesn’t respect the saber in the way Rey does, he rejects it. Tossing the saber instantly establishes Luke’s feelings about the Jedi and his legendary status (i.e. no thanks).
But that’s okay. That’s just where Luke is at the start of the film. It’s part of his journey here, to coming back around to understanding that he needs to pick up the saber and act once again, to be the legend the galaxy needs. This, by the way, is why he uses that blue saber at the end.