Summary
Luffy's identity as Joyboy's successor shocked fans, hinting at his important role in the fight against the World Government. Rayleigh's training of Luffy may have been influenced by his understanding of Luffy's connection to Joyboy and Roger's ideals. Oda subtly foreshadows events, hinting at Luffy's importance through Rayleigh's interest and the Roger Pirates' secrets.
Luffy is Joyboy's successor is probably one of the biggest turning points in the A piece comic series. Learning that the story's main character has a connection to the mysterious Liberation Warrior changed fans' understanding of the story created by Eiichiro Oda. However, Oda may have hinted at this connection long before Luffy's Gear 5 was revealed.
In chapter #1116 of the manga, it is revealed that Rayleigh and the rest of the Roger Pirates knew about the world in the series being flooded, as Joyboy revealed this in the message he left in Laugh Tale. This could imply that his desire to help Luffy become stronger is motivated by his understanding of the Straw Hat Captain's role in the fight against the World Government.
Rayleigh may have known that Luffy had an important role in Joyboy's plans
Luffy being Joyboy's successor might interest Rayleigh
After the heavy defeat suffered by the Straw Hats in the Marineford War arc of the One Piece manga, Rayleigh chooses to train Luffy to become stronger. The Dark King, a title Rayleigh acquired as Roger's second-in-command, was impressed by Luffy's determination and desire to become the next Pirate King. However, it is also possible that this older man already knows Luffy's identity as Joyboy's successor. The Roger Pirates are the only known crew to have reached Laugh Tale, the last island in the world where Joyboy hid his treasure.
Luffy first learned how to use Haki under Rayleigh's guidance.
For many years, the truth about what the first pirate chose to hide on this island remained a mystery. However, in chapter #1116, Vegapunk revealed that inside Laugh Tale is the history of the empty century, as well as the reason why Joyboy failed to destroy the powerful and dangerous Ancient Weapons. Rayleigh, being one of the few people aware of this information, may have been aware of Luffy's importance to the Warrior of Freedom's plans. His harsh training was created to prepare Luffy for the many difficulties he would encounter.
Luffy deserves to be trained by Rayleigh no matter what
The Straw Hat Captain must have impressed Rayleigh with how much he resembled Roger.
While Oda was able to use Rayleigh's interest in Luffy to foreshadow his importance, the identity of the Straw Hat Captain was not something that interested Rayleigh. The first thing that motivated the Dark King to train Luffy was his determination to become the new Pirate King, as well as take action against the evil Heavenly Dragons. Captain Straw Hat is the living embodiment of Joyboy and Roger's ideals, a noble warrior who brings joy and freedom to anyone who needs it. Rayleigh would have trained Luffy simply because the young man resembled his late best friend.
The events of One Piece chapter #1116 changed the perception of the Roger Pirates, as the reason behind them hiding Joyboy's secret remains a mystery. They may have intentionally retained it as a means to protect the new Joyboy. One of Oda's most impressive abilities is the way he subtly predicts events in his series. Luffy's identity and his connection to Rayleigh could be one of these A pieceCleverly hidden revelations by the creator.