Both of these times, only part of the mask was shattered, and it didn’t appear to drastically affect his ability to breathe. This means Vader’s mask, though functional for survival, also serves another purpose.

After the formation of the Empire, the identity of Anakin Skywalker was all but erased — presumably, he was killed during the Clone Wars. Because of the mask, no one ever saw his face. He could fully embrace the identity of Darth Vader, and it would take years for others to learn the truth.

Source: https://www.distractify.com/p/darth-vader-without-mask