From the regulations linked to BoeingBoy’s post an exemption exists which allows you to leave your home for the purpose of “training”, so there is no reason that student pilots cannot attend a flying school or club for that purpose. At the same time flying instructors and other flying school staff can travel to work, as they cannot reasonably work from home.
That being the case why do flying schools have to close for PPL or other training ?