Japan has a large portion of their military spending covered by the United States. It's not a fair comparison. You would need to compare another global superpower such as USSR, Great Britain before the empire waned, Spain, etc. Most of the world's advances have been funded by military resources or wealthy private individuals. I wish it wasn't true because I personally think we'd be better served on cancer research than almost any research into better bombs, soldier exoskeletons, jet packs, etc.