I think that kids should be allowed to listen to music in class because it helps them release stress if an assignment is hard or you are really stressed about a test in the next period I also think this is important in Middle school. It might be distracting some time but I thing it is just there to help you
Some kids are more focused when they listen to music because it helps them stay focused or calm when an assignment is hard or just got bullied and need something to sooth them. Yes it can be distracting, but if the teacher noticed that they weren't getting their work done the he/she would just take their music for the day.
Schools have been existing for centuries, and they hadn't ever allowed kids to listen to music while doing their works. Why? Because it has been functioning well. I think kids have enough time to listen to music after duing their homework and it is not necessary listen to it during the classe or while doing their homework.
From the point of view of a caring teacher, children can listen to music during certain activities as long as it doesn't distract or bother others in the classroom. Music can influence our mood, which in turn may have a positive impact on our learning experience. Music is universal, but should be carefully selected if it's a group activity. If the teacher wants to give permission to certain students to listen because they otherwise disrupt the class, then other students will feel unjustice. Maybe a reward and reenforcement system should be already in place to use music as a motivator and not as avoiding conflict arising by students.