The layer of fat gets between the pan and the eggs and prevents the proteins from sticking. You can cook eggs in any kind of pan—even a cast-iron skillet, but you need to make sure you have oil in it and keep the eggs moving so that a bond never gets a chance to form. For the rest of us, a nonstick pan is best.