I think ego and the patent system take a big part of it. Imagine a country funding research related to cancer. The best outcome will be to cure it. It doesn't matter if you share some of your research and scientists from another country or group solve "the last mile".
The issue in this scenario is how the patent system currently works. Instead of giving the ownership to the scientists who make the breakthrough, the discovery must be shared between the different research groups.