I've always had an interest in WWI (with its being so obscured by the war following) and am not at all opposed to a little revisionism. However, there were several run-ins with Germany in the Pacific (I believe about the time of the Spanish-American War), which led the German military to contemplate an invasion of Boston. This doesn't mean that Germany intended to attack the United States. It means they were anticipating trouble with the US and considered this plan as one way to respond to it.
This is no different to the US preparing for war with Japan since the end of the Russo-Japanese War, long before Japan became hostile to America.
Japan understood what had happened the day the Great White Fleet showed up. Europeans were a little slow to understand but THEY KNEW ~ and within a few years had gotten rid of the Shogun, the organized clans of samurai and everything else that stood in the way of modernization and industrialization.