Years ago, I read an article in which the author pointed out that drivers often behave in their cars as though other drivers cannot see them. Drivers frequently treat their vehicles like isolated spaces rather than what they are: boxes framed in glass moving down public roads. One of the less offensive examples is the driver who gyrates and sings at the top of their lungs with a zeal they would never display in a karaoke bar.
We see some of the same behavior in social media. People often act as though social media spaces on the Internet are the contemporary equivalent of what comedian Flip Wilson called "the booth in the back in the corner in the dark." But an indiscretion on social media is a very public event. Indeed, a recent New York Times article describes how law enforcement agencies are mining social media for statements that help make their case. You can find the article here.
To the extent that people who make these mistakes are thinking at all, I suppose it is possible that they are thinking "well, no one could ever prove that I'm the one who actually wrote this." And, yes, sometimes reasons exist to doubt whether a post belongs to the person to whom it is attributed.
But the law does not require certainty for a statement made through social media to come into evidence. To the contrary, the authentication rules--typified by Federal Rule of Evidence 901--require only that there be evidence "sufficient to support a finding" that the posting belongs to the alleged author. This is a very forgiving standard. Just ask any of the people who were convicted of crimes or who lost lawsuits because they thought otherwise.