A bibliography is an alphabetical list of sources an author used when writing a book, article or essay.  They can be found at the end of written works.

Why do only some articles or books have bibliographies?

Bibliographies are mainly associated with academic research.  Scholars are very conscious about tracing where their ideas originated.  They also want other researchers to know that they have read the important works in their field and are knowledgeable about their topic.  Magazines and popular books may be based on research done by others, but they rarely include a list of sources.  Readers of these types of sources are not expected to look up the original studies or related works that influenced the author.