Maybe because they'd have a weaker immune system due to the cancer and chemo and the mask would help protect them from other germs and stuff at the prom.
My great grandma had to do this before she died. It's so no germs and stuff can go in. When you do chemo, your immune system is gone. Even a simple cold can turn fatal.
You're on the right track. Cancer treatments like chemo & radiation lower your body's ability to fight infections.