Where do you think the information on Wikipedia comes from? Not that Wikipedia strongly relies on The World Factbook, but it can't exist without other secondary sources like these.
Most countries have some kind of statistics department that publishes that kind of data in great detail.
The issues start when you try to compare data, because different sources will use different methodologies
Wikipedia is actually the secondary source when someone reads a page on it, and it requires primary sources (like factbooks) to cite to exist.