The attack came under cover of night. For years, the Imperial Japanese Navy had trespassed into German colonial waters; but this time, they fired the first shot.
This was no warning shot over the bow; this was a deliberate strike by multiple cruisers upon a lone German destroyer. Outnumbered, and outgunned, the ship was sunk.
Japan had been isolated during and after the Great War, due to their geographical location, and the focus of the war being in Europe. They received little aid in their own ambitions, and won just fine all the same.
It was this thinking that led them to believe, under the Taisho regime that they were no longer behind the European powers, but were far ahead of them. A bold assumption, but a mistaken one.