Through the story of Ram, Vyasa is trying to explain that while we believe our problems are the greatest and our misfortunes the worst, there is always someone out there who has suffered more. And just as they survived and triumphed over their suffering, we must too.