We tend to forget Luffy's ultimate goal is to be Pirate king in the end i do feel Luffy has to much attachment . This is huge weakness if oda really wants him to be Purate king . I do think Luffy gets way too emotional this has put him and his crew in danger at times .
He should act like Pirate in the end , i honestly dont think he is cut out to be pirate king with all emotional baggage he carries with him . If you look at Roger and why he became Pirate king makes things clear . I am not saying Luffy should be similar to roger but i think this otama -Ace attachment is getting boring tale now . Luffy needs to level up honestly more will die on his way to throne .
But he is like roger and shanks. They have been portrayed to care a lot about their friends, ready to fight and put their lives at stake for them.
It's a recurrent thing with the Roger's pirates. Rayleigh got attached to luffy in one day and proposed him to train him.
Ace was said to be like his father and he also reacts like luffy.
I know luffy doesn't act like a pirate but there is different kind of pirates in One Piece and in the end Oda has to make them good people, he can't go around killing people who suffer and stealing the poor.
He fights other pirates, steal from them, that's how he is. That won't change.