Trump questioned why the US must defend Japan while Japan has no such duty. But history shows the US itself designed the post-war security pact to serve its own strategic goals