I give you a gift because I desire to give you a gift and you are telling me that I am obligated to give you a gift!?
God wasn't obligated to us. He was obligated to Himself. It was His justice that could not be left unsatisfied. That is where the necessity comes in. God being true to His own nature. He owed us nothing.