The thing is, if you think about it - Sam never had 15 years of experiences to think about anything else. It makes sense that he went right back into Avery’s treasure because he had 15 years to himself and trying not to die in a cell to think about it. He didn’t know he was going to be released sooner than later, so all he had was time to think “what if we found what our mom was talking about?”
Nate had 15 years, as well as three ancient cities, a girlfriend, then a wife, Sully and so many people and all the time to move on from what happened. He never talked about it and never looked back on Henry Avery. When Sam came back that was all he cared about. He didn’t care about Avery’s treasure, he was done with that, but he did it for Sam.
At the end when he found out that Alcazar was a lie, all he wanted was to go home. Sam on the other hand was in sight of the treasure he was looking for and thinking about his entire life. The treasure his mother was looking for, the treasure they built up towards as a family, him and nate, they were so close to the most sentimental thing in the world for him and he wasn’t going to let it slip.
So I don’t think it was greed or selfishness that drove Sam. He is way more complex than that.