I agree. Kids don’t develop the habit of blowing off school in the last semester of their senior year.
School isn’t always fun. But teachers need to make it worthwhile. That too doesn’t start in the senior year. Clearly, these students did not see enough value in their attendance.
It is critical for a teacher to make the subject appealing. It is rare that a teacher can demonstrate the relevance of a subject to real life.