To make Yamato and Luffy quick allies. For this arc and the premused future arc against the WG. A strong character with a connection to Luffy who will fight by his side in the coming dawn. Like Kidd, Law, and so many other characters. Are you saying that all their arcs mean nothing if they don't go with Luffy?
Luffy making friends is easier than breathing for him, that's not new. However, no character has gotten the amount of background baggage that Yamato has gotten specifically with Luffy. You could remove everything about her past except that she hates her father and that would have been enough for Luffy to accept her. Hell, he's accepted others with far less like Caribou. All of the other bits: wanting to leave specifically with Luffy, making Ace's Vivre Card and having him quote her to Luffy, being the reason Luffy was able to find Ace for his final moments, being enraptured by Ace's stories of Luffy and crying at hearing what his true dreams are and that Roger said the same thing, will mean nothing. That's too much heavy background for someone that's just going to end up being a +1 on a list of allies for Momo.
As for other characters, the only ones comparable are Law and Momo, who have been established as
the major Straw Hat allies who have ties to deeper events or mysteries of the One Piece world. Law could remain as a rival, thereby him not joining makes sense and is still in line with his character. At the same time, he wants to know the meaning behind the Will of D. which is seemingly why he took an interest in Luffy and why he saved him at Marineford since he was the only other D. member he presumably knew of. He can keep sailing with Luffy, as a Straw Hat officially or in spirit. Either way will be satisfactory for his character. Momo is the other half of bringing the Dawn to the world and leading Wano back from the brink, so he's got a satisfying arc regardless of joining Luffy. Yamato gains nothing from having all this set up to leaving with Luffy just to say at the end "nah, changed my dream, I'll just stick around Wano."
That will be a waste and makes most of her flashbacks, and her character as a whole, mean nothing.