The use of such masks is to create the effect of training at altitude. But there is a serious flaw in the premise that using a restricted oxygen supply will create better training adaptations. The main adaptation to training at altitude is that the number of red blood cells increase to assist in carrying more oxygen. But this is actually caused by living at the higher altitude for a long period. If you went up to a high altitude to train, but came right back down for the rest of the time, there would be no substantial adaptation. Your system would not adapt as the stimulus (low oxygen content of the air) would not be maintained long enough to cause the higher red blood cell production. Living at a higher altitude will increase your RBC count whether you exercise or not. And coming down to sea level will result in RBC count dropping down to normal levels in about 2 weeks even if you live at elevation normally. And there has not been nearly enough research into potential side effects of such training for anyone to just play around with the idea.
I see this as an attempt to create a short cut to better performance. But short cuts tend to have big downsides. Short cuts also tend to be short lived.