The Mahabharata is a many-faceted narrative that can teach you anything you want to learn. Depending on the way you see the world, you may find in it nihilism, devotion, everyday practicality, or even justification for murder.
I submit therefore that my answer to the question of what the epic may have to teach an atheist / materialist says more about me than it does about the Mahabharata. My view therefore may be considered no more and no less important than the many views on the epic that have come before me.
The fundamental lesson I have learnt from the Mahabharata is that justice is an illusion. It simply does not exist.
In the epic, we see good men make honourable decisions that end in tragedy. We see noble people stand by in silence while injustice happens before their eyes. We see good people suffer and bad people prosper. We see god orchestrating war and justifying the killing of family members. We see innocent children dying for no fault of their own and we find that the divine justifications offered to justify these tragedies fall woefully short of doing so.
At the end of the day, human beings are leaves flying about in a merciless storm that is reality. Things happen, people die, and life sucks. Nowhere else is this more evident than it is in the Mahabharata.
It’s not all bad though. The Mahabharata also tells me that though there may be no gods in the sky that will make sure I do not suffer, it is within my power to make the best of what I have and try. Sometimes — not often but sometimes — I just might get the thing I want. Ekalavya is the most prominent example of this. He won some (through his own effort) and he lost some (out of a misplaced sense of loyalty).
The Pandavas too, because they were wedded to the idea of doing the right thing, brought suffering after suffering upon themselves. In the end, what worked out for them was getting a hint and standing up for themselves. However, it took god to convince them.
Every one of us can have views on what characters in the Ramayana and the Mahabharata should have done differently. But we all would also agree perhaps that the Mahabharata would be a far lesser story if it wasn’t steeped in the kind of realism that defines it. The Mahabharata has survived as a cultural artifact for thousands of years and may even be called India’s spiritual spine.
In modern times, despite devotion having become pretty much our default approach to spirituality, the Mahabharata’s stark message of realism can serve as a robust alternative. If we take heed that is.