As part of the natural protection against microorganisms, many foods have antimicrobial factors. Milk has several nonimmunological proteins which inhibit the growth and metabolism of many microorganisms including the following most common:
More information on these antimicrobials can be found in the dairy microbiology textbook by Marth and Steele. See also the discussion on lactoperoxidase in this series at https://www.uoguelph.ca/foodscience/book-page/effects-milk-handling-quality-and-hygiene
Where the intrinsic factors are related to the food properties, the extrinsic factors are related to the storage environment. These would include temperature, relative humidity, and gases that surround the food.