Cow dung is added in the composting pit to
Act as a source of micro-organisms
The refuse contains organic matter which is to be treated with microorganisms in order to convert it into compost. Cow dung act as a source of microorganisms and hence it is added.