Should teachers let students listen to music?

When you are in class you get bored just hearing the teacher talk and when they are done they expect you to do work until the class hour is over. I personally don’t like that type of class, I like the type of classes that let you have fun or even let you chill and hear music. Why can’t all teachers let us students at least hear music when we a doing class work and staying on task? Most of the students you see them are walking to their next class bumping music and having fun hearing it. If teachers would let students hear music in class most of them would stay on task as they are listening to music and would also be blocking off other distractions. I think teachers should let students bump music in class.