Guinea pigs are very prone to experiencing birthing complications that can result in either the death of the mum, the death of some or all of the pups, or the death of them all.
There are certain factors that can increase their chance of experiencing complications, such as if the sow is older than 9 months old and it is her first pregnancy, or if the pregnant sow is fed an inadequate diet, or if she is a very young sow, or if it is a back-to-back pregnancy (where she gets pregnant within two months of her last birthing) or if there has been a significant amount of inbreeding.
However even under the best circumstances sows can still experience fatal birthing complications simply because guinea pig pups are very large when born in comparison to the mother, sometimes a pup can't pass through the mother's pelvic bones and gets stuck.
The high risk of complication is one of many reasons why we strongly recommend no one intentionally breed their guinea pigs, and to double check the gender of guinea pigs for themselves before placing them together.
As for why your cocoa died, we can't say for sure, the only way to have known the answer to that for certain would have been if you had gotten a vet to perform a necropsy after she died so the vet could determine her exact cause of death. All we can do is make an educated guess as to the cause, but without knowing more details about her death (such as how promptly after birthing she died, was there a lot of bleeding, was she straining, did she pass any placentas, and any other noteworthy details) we can't narrow it down much beyond it likely being attributable to a birthing complication. However even with the extra information regarding her death we still might not be able to narrow it down too much.