Databases store everything what you see on the website. They are used because they can store enormous amount of data and most importantly, retrieving the data lightening fast.
For example, few of them are listed below:
Username and passwords of all users
Logos and content of the website
Validations on the input data