To aid in keeping one safe.
There are two kinds. Solid polycarbonate masks and goggles protect against flying debris, while soft fabric masks protect against dust and infection.
A safety mask is used to prevent dirt and fumes, contamination etc from entering the body.