In my experience, it's because some sequence of characters within somebody's posting is conflicting somehow (???) with the back-end script. The back-end script panics, which causes the server to gag, and then we all get the "500" error.
Sometimes this is recoverable (if the troublesome post is erased and not reposted), but sometimes the issue is persistent, especially if the poster keeps trying edits or snippets, without knowing what the frick the problem is. Then we all have to wait until the server host notices the error, and reboots the server.
Fun. :sad: