As they perform their natural function, ammonia is one of the by-products. There are a number of other organic ammonia producers, besides the initial ammonia production from the fish in the aquarium. Other wastes, like dead plants and fish are subject to the same decay processes as mulm, adding their substantial volume of ammonia to the water solution. More importantly, excess food added by the kind hearted aquarist also rots and produces an enormous amount of ammonia. This is a source that must be eliminated for an aquarist to be successful in the longer run.
Inorganic ammonia is also a plague to the modern aquarist.
The most common source is from the water supply. If there is chloramine in the water supply, ammonia is almost assuredly being added to the aquarium with every water change. Even when municipal water uses only chlorine to make water potable for humans, ammonia is often found as one of the components as well. An old style filter material. Filiments of fiberglass strands were often used to trap particulate waste in air driven filters such as inside box filters.