Totally different subjects.
Japan refused to treat shipwrecked sailors humanely.
Hawaii welcomed the strange explorers with open arms (at first). Hawaii remained independent for over a hundred years. Japan is still independent, after the occupation form WWII, where they killed off tens of millions of Chinese.
Sounds like you are pushing some kind of weird isolationism/Buddhism, where the USA must take no action, lest their be a potential bad result.
Notice your jump from the Barbary wars to Hawaii and Japan?
Totally different subjects.
I haven’t gotten to the American Indians yet. There was plenty of land just east of Appalachia for everyone.
Japan refused to treat shipwrecked sailors humanely.’
Very true. Strategic location for refueling. Did they have the right to cut off our trade with the rest of Asia?