This is about religious education (what used to be called CCD or Catechism). They are classes to teach the Faith to children.
The classes, or some subset of them, are required for the children to receive First Communion and Confirmation.
Okay, my bad.
Then, I agree with the priest.
When my mom was growing up, there had to be a very good reason why ANY Catholic child was not in a Catholic school. If you couldn't afford it, the Church found a way.
I notice a few of those kids every Sunday as I go to 10:00 Mass. They wait for their parents outside the Church for their parents to come pick them up. I would say 2/3rd of the kids attend Mass with their parents right after CCD class.