Yes, it is a waste of time of everyone involved, and it detracts from the education that could be given to those who are committed to the faith. I say this as a CCD instructor. Half of class time was spent on the worst 10% of the class, none of whom ever attended Mass.
To limit religious education to only those whose parents are "serious about religion" is a very self rightious practice.
Well, its what the Church did from the time of Christ right up to around 1965 or 1970.
I teach religious ed also. (called PSR here) Behavior issues are separate from attending mass. In your case their appears to be some overlap, but a child who doesn't attend Mass is not necessarily a discipline problem. There are many children who do attend Mass that are also discipline problems. I am lucky, in the 6 years I have taught I have not had many behavioral problems. God has blessed me with much patience to handle the problems that I have had.