Cannibalism in mice is due to several things
Bad mice, selective breeding is essential
Stress
Improper hydration
Improper diet (you need at least 18% of protein)
Over crowding
Cannot care/feed their young
Cleaning (they are scavenger and will eat the dead)
If it keeps re-occurring you will have to start your colony again from scratch.