Following last week’s school shooting in Florida that killed 17, President Donald Trump called for more regulations on gun control, and now firearm stocks are rising. This phenomenon is not new — less than 12 hours following the Las Vegas shooting in October, gun manufacturers’ stock prices surged — and it’s not a coincidence.

Psychologists explain that mass shootings trigger simultaneous fears that lead people to buy guns and invest in gun companies. Fears of gun violence make people want to protect themselves, and fears of tighter gun control legislation in the wake of a shooting make people want to get guns before they become harder to get.

See Also: Why Kinder Surprise Is Illegal in the U.S., Unlike Semi-Automatic Rifles

Behind these fears lies an inability to properly assess risks and an aversion to changing one’s mind, explains Sara Gorman, a public health and behavioral science expert who co-authored the book Denying to the Grave: Why We Ignore the Facts That Will Save Us, which addresses why people ignore facts that would help them make better decisions.

“Humans tend to assess risk in a way that’s not that scientific but rather emotional,” she tells Inverse. “We have a strong bias (called the availability bias) that causes us to pay too much attention to low-probability risks that become easy for us to imagine due to extensive media coverage and discussion … Because we tend to favor information that’s readily available to us, and because readily available risks feel more salient. Even when technically the probability is low, we end up perceiving a high risk.”

gun show 1025141449
Mass shootings bolster the gun industry because they spark fear in people.

This out-of-proportion perception of risk, in turn, can lead people to think they should buy a gun. But according to Gorman, this leads people into another trap, which is the mistaken belief that a gun will keep you safe and that your gun won’t make your home more unsafe.

“In reality, if you buy a gun and store it in your home, you’ve just drastically increased the chances that you or someone in your home will die by that gun, whether through an accident, suicide, or domestic dispute,” says Gorman.

“No matter how often we tell people how much more likely it is that their gun will be used to kill them, their spouses, or their children, they insist that those facts do not apply to them,” Gorman wrote, along with her co-author Jack Gorman, in the wake of the Pulse nightclub shooting in Orlando last year.

In addition to this misperception of risk, Gorman says humans brains are wired to reject challenges.

“Any time an important part of our identity gets challenged we are likely to double down and become essentially panicked about reinforcing that identity,” she says.

Joe Pierre, acting chief of psychiatry at West Los Angeles VA Medical Center, has written about the psychology of gun ownership. He tells Inverse that the trend of fear-based market trends is well-established, and it extends beyond the short-term fear of a mass shooting.

“Gun sales seem to increase significantly with those owning or aspiring to own guns become concerned about gun control legislation being passed,” he says.

This trend played out not just in the wake of mass shootings but also during Barack Obama’s presidency. Fearing tightened gun legislation, gun owners and aspiring gun owners bought more guns during President Obama’s second term. Since the inauguration of Donald Trump, who is seen as more of an ally to gun owners, gun sales have plummeted.

“I can only presume that pattern of sales might also guide investors,” suggests Pierre.

The fact that this trend surfaced again on Monday as the stock market opened indicates that people’s dual fears of shootings and gun legislation, as well as their impaired risk assessments, are alive and well. Gorman says the complex psychological reactions make it really challenging to have public discussions about how to curb gun violence since media coverage can contribute to public fears. She says that even though this conversation should proceed with great care, it should definitely proceed.

“This doesn’t mean we shouldn’t talk about gun control. Obviously, we should.”

This article was originally published in October 2, 2017, and it has been updated with new information.