This money is gained from selling natural resources (that btw belong to population) or from some other sources that I'm not gonna touch here. And it's spent for their own need when could be invested to industry and high-tech development.
Just check this and all questions will drop out