Compost can smell if not enough oxygen is supplied during the decomposition process. This can happen, for example, during winter seasons with heavy rainfall where excess water can prevent air from entering the compost pile.
However, the quality of the compost is not affected and if you aerate it well after picking it up, the odour will dissipate.