@No:
But in that analogy, your friend gains nothing while the Skypeians still got peace, their homeland, and an entire city of gold goodies. I would say that what Luffy and co did was more akin to fishing coupons out of your friend's trash. Yes, that is technically illegal, but I seriously doubt your friend would care enough to report you. Even if everyone learned about what the SHs took, I can't imagine a stronger reaction than "oh, ok." or anyone bothering to go collect the gold themselves if the SHs didn't steal it.
I mean, the SHs could have taken ANYTHING from the literal city of gold, but instead they opt to clean out the digestive tract of a giant snake. And again, that is technically "immoral" and the most noble thing possible to do would be to give it all the Skypeians, but this was supposed to be the Straw Hat Pirates finally committing some piracy, and I think Oda intentionally had them take something that wouldn't affect anybody at all in the long run so that the heroes of the story (saving countries > sharing meat :P) don't do something really "bad."
It's not technically immoral, it is without doubt immoral.
You're saying it yourself, the point of the scene was for the StrawHats to be piraty, which is, even in OP world, wrong. In our eyes it is of course redeemed because they stole the present the Skypeans were going to give them but even in the Strawhats eyes what they did was wrong.
Also your analogy isn't working that well. Because if you were going through the trash it means your friend already saw what it was and threw it out, not in this case.
This is like if you inherited an old house with a locked attic, your friend comes over and says "Oh, I can unlock it", and then after he unlocks it he decides to take whatever catches his eye without bothering to ask you. Maybe it's something that's filled with your family history, who cares right?
According to you that's normal, according to the rest of the world that's a crime.