Facebook stores almost every single interaction you've had with the social network since you joined, including every time you've logged in, ads you've clicked, events you've been invited to, a list of the people you follow, your friends, your hometown, every time you've sent or received a message, every single status update and more.
It's basically the history of everything you've done on Facebook. It's also the data that Facebook can use to learn more about you. When others get unauthorized access to this data, they can learn a lot about you as well, as we learned from the Cambridge Analytica scandal that's currently unfolding.
Here's how to see everything Facebook knows about you and how to download your own archive of that information. It might be useful, especially if you're planning to quit and take some of those memories with you.