This is a fascinating write up on “price gouging”; morality should outweigh the profiteering by select few because morality is for the greater common good.
However, the pricing structure aligns the incentives. Being a medical professional may signal a money printing machine but it isn’t. Most users realise that the additional hassles (that includes EMR’s!!) aren’t worth the price. That’s a debate for another day but highly recommended read.
Pricing is usually the best way to allocate resources, by revealing who is willing and able to pay for something. But there is no doubt now that masks are most essential for medical workers. Ordering large supplies at fixed prices is the right policy. The public benefit of a functioning health system far outweighs any harm in impeding sellers from maximising their profits.