Starting the shallots and garlic in a cold pan allows them to gently heat up along with the oil, and gives them the time they need to drive out all of their moisture and become crisp. Take your time with this, the worst thing you can do is rush the process and crank up the heat impatiently.