Undercutting helps to prevent interference between gear teeth when you have a small number of teeth on a gear.