The most common reason is that the onions were not cooked long enough. Be sure to cook the onions until they are golden brown and crispy. Another reason might be that the onions were overcrowded on the baking sheet. Be sure to use 2 large baking sheets so that the onions have room to spread out.