The purpose of temptation