God did so to make it easier for us to know what we needed to do to do good and avoid evil. As the situation of man was debilitated because of original sin, man needed assistance to know accurately God's Will in the Decalogue. Without this aid man would have tended to commit errors in getting to know God's laws, not everyone would be talented enough and have the necessary time to analyze his experiences to distill from them the way to please God in our behaviors.