We get thoughts that pop up in our head based on a memory. If your childhood was plagued by bad experiences of abuse, trauma, arguments and family violence, your brain became programmed to those negative experiences. The repetition and patterns of negative behaviors in a negative environment hard wired your brain to have recurring thoughts even as you get older. And since you get thousands of thoughts every day based on your experiences, you'll sometimes get these negative memories creep into your headspace, reminding you of those bad times. These reminders can make way for unhealthy behaviors. This is partly the reason behind depression and anxiety because we create these unhealthy thoughts from our past which creates the depression, and we respond with fear and anxiety.