During digestion, the liver produces bile and releases it into the duodenum via the bile duct.This is to emulsify fats, giving lipase enzymes a larger surface area to work on. Also, it neutralises the stomach acid as bile is alkaline which provides digestive enzymes with their optimum pH.