Because the gall that the midge creates prevents the plant from flowering and producing seed.
(the gall; creates; the midge) (the gall that the midge creates; prevents; the plant; from flowering and producing seed) (the plant; producing; seed)
the gall the gall that the midge creates the plant
creates prevents producing
the midge
the plant from flowering and producing seed
seed