Temptation is a mandatory byproduct of ones free will.
Free will is necessary for the reality of love to exist.
If love is forced then love is false.
Sin was inevitable. Adam and/or Eve would have eventually sinned at one point in their living upon the earth.
God knew this and created mankind anyway. Now, every time that you've sinned you had an out.
God did this in order that He may rescue the humble by opening their eyes to the Good News of His experiencing the requirement for sin (though He had none of His own) which is death and in the process making enough payment for the worlds sin.