What is the overall purpose of a style guide such as the MLA style guide or the APA style guide?
They are two standardized ways of giving the key information about the sources you used so that others know where your info came from.
So, citing your sources = good, stealing other people's work = bad.
Let's just have that established.
But it's not enough to just drop a link or a book title, because it really gives little information about where on Earth that source came from and whether it's trustworthy.
If you just drop a link, then maybe if I pick apart the url I can figure out the website and article title, but it's at least as likely that I won't be able to figure that much out, and why should have to squint and pick at the url anyway, when you can just write for me what it's called and where it came from, as well as other relevant information like the author, publication date, publisher, etc.
It's nice to know that your source is not written by Joe Shmoe, is not outdated, is not from a biased publisher—all things that your citation tells me. This is even more important for books, because there are a whole bunch of books with really similar names and you want to let people know which one you are citing.
MLA and APA are just two standardized formats for how to list this info, APA for science and MLA for humanities. If you listed stuff willy-nilly, then you might forget to stick something in, and even if you didn't, your citation information would be less organized.
Readers who came across your project for information could use your sources to learn more.
Teachers grading your work probably won't really research your sources to learn more about whatever fascinating topic they assigned you, but they might want to double check the credibility, see that you cited a source a bit more credible/less cheaty than Wikipedia or a random forum or Sparknotes or a Buzzfeed quiz. Have a phobia of good grades? Just hate being in your teachers good graces? Cite one of the listed above and banish those possibilities forever!