So, manure is decaying animal excrement. Compost is decaying animal excrement plus some additional biological matter handled in such a way that certain species of bacteria take over. Basically, you turn it frequently.
What kind of bacteria take over? Aerobic ones. Now, granted, aerobic bacteria do produce greenhouse gases, but they're in the form of CO2, which really isn't so bad. By contrast, anaerobic bacteria release more potent greenhouse gases such as methane and nitrogen dioxide.
A big steaming pile of manure, left on its own, will easily be overtaken by anaerobic bacteria. With proper treatment, however, aerobic bacteria will dominate.
Worms and bugs need a balanced diet. So a farmer will, presumably, add crop and other agricultural waste to cultivate these helpful aerobics.
(I'm only a backyard horticulturalist. Gardening experts stress adding a balance of leaves, grass clippings and miscellaneous 'organic material' to one's vegie scraps for a healthy urban compost.)