I disagree. It's not about her ignoring her obligation for doing her schoolwork, it's about her not following the court's order.
Law may be harsh and fair in the same time. Being ordered to do her homework was a weak sanction, she ignored it, so she needs a stronger stimulus. So law isn't dumb, it's just consistent.