According to who? Who is this person or person who is dictating from on high to the American people? And why should be be taking what they say as if it was handed down to us by God?
You are speaking of the first Barbary War. Which occurred when Tripolitania declared war on the USA after it...
The Founding Fathers and pretty much every President before Theodore Roosevelt would like to have a word with you on the subject of foreign interventionism and over seas alliances being a bad idea.
I do feel sorry for the poor programs who worked on this; as for the writing, it's not so much edgy as it is bad and, if you'll excuse the term, 'degenerate'. This is bad fanfiction stuff.