Of course economists know that markets are not perfectly efficient, but what they tend to believe is that markets tend towards efficiency, and markets that are big enough and free enough will correct trivial inefficiencies relatively quickly.
This is why the advice is generally that returns in easy to access markets are very closely related to the risk you took on. If you made better than market returns, it's probably because (whether intentionally or not) you took on more risk than the market as a whole. This doesn't hold true for those with an information edge, but more people believe they have such a thing than actually have it.
This is a particularly... interesting (for lack of a better word) submission to appear so repeatedly. Maybe it's just the right word-combination to appear in hn? Computer science + finance, with a touch of academic-ish?
Socialists need to discredit the market.
2018 https://news.ycombinator.com/item?id=17202950
2012 https://news.ycombinator.com/item?id=4589264
2011 https://news.ycombinator.com/item?id=2895474
Discussed at the time: https://news.ycombinator.com/item?id=1144548
and https://news.ycombinator.com/item?id=1124782 (a bit)