they were told directly by God (well, Adam was told directly and Eve had knowledge of it), not to eat from the tree. When Eve gave the fruit to Adam, and he ate it, they were directly disobeying what God had told them to do. they didn’t have to sit around and ponder if they should or not, they had a clear answer already, and disregarded it.