It is also to give credit where it is due. But most importantly, and along the same lines of the previous post, it is to give proof of research and supporting evidence. More to the point, it is akin to scientific research. Scientific analysis and experimentation always has more support in its claims if other scientists have done similar experiments or analysis. This is academic collaboration, even if it is simply reading and citing the work of others in order to support your own. So, it is more than just avoiding plagiarism. Citing establishes a more connected academic community. Think of it as an analogy to you and those you cited sitting in a room at a conference. The research you used to form your thesis was partly based on their contribution; without them in that room, your thesis would have been different and maybe less justified.
Authors cite resources in non-fiction and academic works, because the book or article has a thesis claim it is trying to prove. In the academic world, one is expected to show their work, to back up their claims with not only explanations but proof. This gives credibility to the researcher/author. Since the purpose of the book is to educate and/or persuade, the citation is the evidence that backs up the conclusions in the book.
Think of it as a court case. You don't just start with an opening statement that says "He's guilty" and leave it at that. You bring in expert witnesses, in this case, the citations/sources to help you prove your case. Then you don't just introduce them one by one and leave the jury to figure it out, you tie the evidence together to support your original conclusion.
Citing the resources used in a research paper serves three purpose. First, it enable other reading the paper to check the validity of the information contained or claims made in the paper by comparing the information in the paper with the original source. For example one can check if the material taken from other sources has been taken selectively that gibes a biased picture of information contained in the original source. It is possible that the researcher has interpreted the original source correctly.
Citing of original sources also enables people to get additional detailed information there. This is particularly useful who want to research in greater details some of the points raised in the research papers, or continue the research beyond the point where the research papers carries it.
Finally citing gives credit where it is due. It is wrong and unethical to claim as your own ideas and information you have borrowed from others. In addition, when the source used is a well established authentic work, it adds to the credibility of the research paper.