I used to crush small snails in an aquarium as a kid and one of the danios would eat the remains. Over time, it's belly area became round and it had difficulty. Then it's stomach ruptured.
Assuming it's not sick/ill/disease etc., it could have eaten something it can't digest, whether man made or organic.