Allah out of His love and mercy tells us what will happen if we do certain things in order to warn us - it's like as an adult I know that if I throw a rock up it will fall back down due to the law of gravity - a child may not know this - as a loving parent would I not tell my child that if you throw the rock up it will come back down and hurt you.
There is a system of cause and effect and Allah is explaining this to us. So we know if we do somethin what the effect of it will be.
It is important to fear disappointing Allah rather than fearing Him.