That is again a case of the school fulfilling its remit, and educating children about formal or smart clothing for an interview.
Wearing pajamas in the daytime when a parent is not attending an interview would be a poor analogy to use, and unnecessarily hurtful to children whose parents wear daytime pajamas.
Schools lose when they undermine parents in a snide way, and show themselves to be classist. Schools need to meet families where they are.