Pyridine is frequently used in reactions involving acid chlorides because its basic nature helps to neutralize the HCl by-product generated during the formation of the desired product and the elimination of the chloride ion. This prevents the formation of other by-products.