At the beginning of the series, we knew two things about Shanks. Unknown to us (and probably Oda) at the time, both of these things are INCREDIBLY important:
– Shanks set up his base at Dawn Island for over a year.
– He stole the Gomu Gomu no Mi.
In light of the most recent chapter, these things both seem to no longer be coincidences. First, it makes no sense for Shanks, a future Yonko tier, to be on Dawn Island in the East Blue. The only way this makes sense is if he was looking for something. Second, it seems unlikely Shanks would pursue a specific devil fruit and have it unused in a box at his base. It seems likely he was in the east blue and had the Gomu Gomu.
However, it seems unlikely Shanks knew the true nature of the Gomu Gomu no mi, considering that; he would have freaked out more when Luffy ate it, and he did not go to Raftel and probably did not learn the true history.
But Shanks was apprenticed to Roger, who likely learned about the Gomu Gomu fruit on Raftel. We also know that Roger wanted his son (Ace) to become Joyboy.
Proposition: Roger told Shanks to get the “Gomu Gomu no Mi” and give it to his son (also probably the straw hat). This just makes sense. Roger, wanting his son to be Joyboy, tells Shanks to get the Nika fruit to his son, Ace.
However, Ace has not actually been born yet, and thus Roger can’t tell Shanks how to find/identify Ace. But Roger did known that Garp would likely take Ace to Dawn Island, the same place where Garp raised his own son. Therefore, Roger told Shanks to go to Dawn Island, and find his son.
There’s just one problem: Ace was with Dadan in the mountains, so Shanks can’t find him. Shanks was looking all over the place for someone who seemed like Roger’s son. He found Luffy, who reminded Shanks of Roger, but Luffy was too young to be Roger’s son, and therefore Shanks could not give him the fruit.
However, when Luffy ate the Gomu Gomu fruit, a complete accident, Shanks did something radical. He said “Good enough. I’m betting on Luffy. He’s inherited Roger’s will anyway, even if he’s not his son.” Luffy ended up with the fruit Roger intended to give to Ace due to Shanks not realizing the magnitude of the task. Shanks also gives Luffy his (and Roger’s) hat to show that he’s betting on him.
This would also explain Shanks being humored by Ace’s existence: as it turns out, the kid he was actually looking for was Luffy’s brother the whole time.
After saying “Good enough,” Shanks feels free enough to go become a Yonkou and follow his own dreams. This theory explains three things:
– Shanks’ interest in Luffy on Dawn Island and him BEING on Dawn Island in the first place.
– Why Shanks stuck around so long. Shanks even indicates that he’d stayed on Dawn Island for too long after leaving—he had wasted all of his time there looking for someone he couldn’t find.
– Why Shanks chose to leave almost immediately after Luffy got his fruit. Shanks was sticking around on Dawn Island for a full year (abnormal for someone of his caliber), and only left once Luffy ate the “Gomu Gomu no Mi”.
Tl;Dr: Shanks went to Dawn Island to find Ace and give him the Gomu Gomu on Roger’s last orders, he accidentally gives it to Luffy.
Theory by WeslePryce (https://www.reddit.com/user/WeslePryce)