Bagels are boiled before baking so that the outside starts cooking before the inside catches up. This way the outside layer is harder and chewier while the inside is soft.