It's funny, because Buggy tried so hard to betray Luffy so many times. It's like the universe itself wouldn't let him not help after Luffy gave him the treasure marker.
Mihawk will make it explicit during the Marineford arc that Luffy's greatest strength isn't his physical prowess, but his ability to make allies. It's interesting to contrast the way in which Luffy wins people over compared to other thematic foils like Blackbeard, who gains equally enormous influence through violence and coercion. Luffy's guileless faith in characters like Buggy (which later shows up in his alliance with Law) is on its surface stupid in the cutthroat world of pirates, but it's because not despite Luffy is who he is that he influences others to his cause.
Cynical characters like Buggy and Mr. 3 will try (and fail) to take advantage of him, but by mere proximity Luffy will in turn inspire them to grow beyond their base instincts, and he's rewarded by the narrative for his trouble. Mr. 2 comes back to save him after being terrified of Magellan. Mr. 3 unlocks the keys to Ace's cuffs. Buggy saves his ass repeatedly through the saga. It's like Luffy is a gravity well that people can't help but fall into, and it's that charisma and ability to almost instantly create bonds with other people that will cause him to eventually become the Pirate King.











