This occurs because students actually took the assessment prior to the teacher trying to delete/remove it from the class. 

Once an assessment has one attempt by any student in any section, it is locked down regardless of if grades have been recorded or not.

If the assessment needs to be removed, teachers will have to unpublish the assignment and remove it from counting towards the gradebook cumulative.