Having a full board with a lot of ground plane and ground pins exposed, the risk of getting a dangerously high ESD voltage at some IO pin or internal sensitive node is just so much smaller compared to if all the pins are exposed directly.
Also, for example, MOSFET gates are most sensitive to ESD, so they don't have those exposed on the board connectors.
IO pins that they directly bring out to pin headers have ESD protection, albeit not very good, but much better than nothing.
Finally, these products should really be handled with proper ESD precautions. It's just that given the above points, risks are smaller. If people have troubles with such cheap boards, they just say, "hey, it's broken", get a new one, and don't analyse why it failed. It can very realistically be due to ESD.
You could design said products to be safer against ESD, to different levels of requirements, but Raspi or especially Arduino do not do this because they are the lowest cost race to the bottom products.
You could easily add ESD protection components to each IO brought outside then add a tiny metal box around the product, but that could easily increase BOM cost by like +100% for an Arduino or like +20% for a Raspi.