A variety of long-term and short-term factors led to empty shelves for parents searching for baby formula.