The usual reason for this is that mould and mildew has accumulated inside your unit due to a lack of maintenance.
However, the smell could also be caused by a deceased gecko or rodent having crawled inside your unit.
If you are noticing a bad smell coming from your air conditioner, it’s best to arrange for a technician to check it out.