I am so very sorry for your loss. There is nothing like losing a loved pet.
Unfortunately there really is no way to tell you what happened short of you getting an autopsy. If you could afford a vet visit you might gain incite on what happened and figure out how to avoid it in the future. It could be anything from a genetic defect to an infection to a tumor.
If nothing else a autopsy from a vet would give peace of mind.