Sometimes during class, I stop and ask the students, "Why do you suppose we are doing this activity/exercise?" I do this because I want students to know that what we do in class (and out of class as homework) has purpose. It is not a waste of time, and there is good reason for doing it.
Sometimes I dictate words or sentences to students in Spanish. They number their papers, say 1 to 5, and I say a word or sentence in Spanish, and they write the same in Spanish. Then, when we have finished them all, I write everything on the board so they can self-check.
Before or after this "activity/exercise", I might ask them, "So, why do you suppose I would have you do this?" Then students begin raising hands and offering their thoughts. They say things like, "To help our spelling." "So we practice listening." "So we write better." and so on.
And I say "¡Sí!" (Yes!). And I offer other reasons that they may have missed.
I think this is really important to do from time to time because I think that when students learn to see the purpose in what they are doing, what they are getting from it, it can help motivate them, or at least help them to have a better attitude toward their school work.