The primary function of an oven in a laboratory is to provide a controlled environment for drying, sterilising, or curing materials.