Disobedience. They were in covenant with God. There was one stipulation in the covenant...don't eat...or die. They transgressed the term of the covenant, so God executed the provision fordisobedience...He killed them.
Incidentally, this is what happened to Israel in 70AD on a larger scale. Israel had not met the stipulations in their covenant with God, and He executed judgment upon them.