Yes. A dust collector is designed to clean the dust's air and work surface that you generate as you work. Dust is a health hazard, and when breathed in, it can cause several respiratory problems.
Wearing a dust mask will only protect you from the particles you can see and not the minute ones. The smallest particles are the most dangerous and most likely to get into the lungs and cause the most damage. Even when you wear a dust mask, a dust collector is still a vital component.