How does StackOverflow [...] prevent Panda Penalties?
It doesn't, and in my (watch it, N=1) experience Google is backing out of what used to almost seem like a hard-coded preference for showing Stack Overflow results for your searches.
In fact, since quite some weeks, a handful of months at most, I find that Stack Overflow search results are sinking to the bottom of the first Google page, sometimes even being entirely absent. This while I know there used to be Stack Overflow Q&A results for equivalent search queries.
I can imagine the high bounce rate and low finish rate have something to do with this. When I'm researching a certain technology, lately more often than not my search doesn't end at a Stack Overflow page, but at another site, because the first five Stack Overflow hits don't explain anything but instead contain code copy-pasted from another answer or site, which isn't helpful (yes, it's a pet peeveit's a pet peeve).
The DaniWeb article you refer to, posted in July 2013, contains some of links to web searches* where they claim the first page is "StackOverflow-ruled" and "DaniWeb is nowhere to be found". Ironically, if you perform those searches now, they are back, and Stack Overflow not quite so.
The same happens when using different browsers, Google accounts and search engines.
*: this was exaggerated somewhat and has been edited. Most linked searches return the same results as back then, but "DaniWeb nowhere to be found in StackOverflow-ruled Google SERPS" is still not true anymore, especially the last part.