Piracy def. = the act of robbery and criminal violence by ship or boat-borne attackers while on land or sea
Those were all acts done for the greater good, necessity or desperation. Last act of genuine piracy was stealing that gold.
It working out for the great good still Piracy.
There pirates that things for greater good back in day for there people but they were still pirates .
Luffy crash BM home and fucking up the place to steal a copy of something and get back someone still piracy.
Loads of piracy was done in history and even to this the day for 3 reason you list .
Shit nami was going steal the giants gold just last chapter lol