Fungus, mould and bacteria are common throughout all environments on earth. They share and thrive in the same environment humans live, competing for the same living space and air.
An indoor air space can be affected in multiple ways from 1) an excessive number of occupants to inadequate ventilation, 2) the occupants (people and pets) bringing the germs in via their clothes, shoes etc., 3) the occupants being themselves infected and breathing out germs into the environment, 4) very commonly, when open windows let in air that is contaminated with airborne germs such as in spring when pollen containing mould is blown about, 5) when the building has defects that result in water accumulation in walls or floors enabling mould and bacteria to grow.
Any factor can initiate build-up of mould and bacteria. When mould and bacteria reach above certain concentration levels, people start becoming ill.