We are, that we might have joy – not superficial pleasantness in life, but real, sanctified joy that comes through living a dedicated life and the crucibles of consecration or soul stretching. Joy only comes through those things – so to experience them (through mortality) is meant for joy – and meant to be. We could rephrase Lehi’s teaching to say, “Men are, that they might attain unto joy through suffering (and the grace of Jesus Christ)”.
Joy doesn’t depend on conditions being wonderful; it depends on us. So the aim isn’t to have perfect conditions in life, but to find joy in whatever situation exists. It’s difficult, but I think that’s the point….