That's not always the case. I taught at a middle school as a computer instructor. I taught computer applications though projects that would give my kids the skills to be ready for high school.
--
Our middle school had a rotating schedule so that you would not have the same group of kids for last period every day. A difficult class on the last period of the day could be a great class the following morning when I had them 1st period. The rotating schedule allowed me to structure last period as a review and catch up period with a bit of free time for those caught up with their assignments. I never introduced new or important concepts last period. By last period the kids are tired, they have already dealt with five or six other teachers.
--
I feel your pain. I always struggled a bit with classroom discipline. I always believed that the strength and creativity of my lessons would have the kids so enthralled they forget to act up. Wrong.
--
The best thing about teaching is the renewal of knowing that if a lesson bombed, you can learn from it and never teach the lesson the same way again.
--
Good luck, it's never an easy job, but I can't think of a more rewarding one.