You know how some people have lucid dreams where they realize they’re dreaming and can do anything they want without it having real consequences in their real life? It’s a primitive feeling of liberation; you can do things that you’d never think of doing in real life because you know that what happens in the dream stays in the dream.
For some people, the online world works the same way. Because there’s (in principle at least) a firewall between online and real life, one feels immune from the consequences of what one says or does.
We’re complex creatures. Remember Phineas Gage? He got an iron pole rammed through his left prefrontal cortex and survived. But that’s the part of the brain that restrains the more primitive impulses and behaviors. The PFC calculates the consequences of actions and decides whether to give in to or override the more primitive parts of the brain. Phineas Gage minus his PFC started acting like an obnoxious internet troll.
Those more primitive impulses aren’t “what we really are”. Neither is the prefrontal cortex. It all works together. In some environments, like dreams and online, the PFC sometimes steps out of the way and lets the reptilian brain take over. Other times, the PFC judges that the reptilian brain needs to play nice because real people with real feelings are on the line.