Neonatologist told us this morning our premie has nec. What did they do wrong?

NEC. Nec is associated with mostly prematurity. Usually it is nobody's fault. It happens due to combination of factors including prematurity, feeding, intestinal immaturity, possible sepsis. This condition is not uncommon in nicu setup.
Likely nothing . There are so many possible causes of nec but as today there is not known cause. Many believe it has to do with the way feedings are advanced others with the amount (volume), others with changes in gut perfusion or with intestinal bacterial overgrowth but the reality is that it is an unfortunate situation that sometimes resolves without major consequences (depends on the grade). Sorry and good luck.