This question requires an answer that provides a personal opinion. I'll write according to my own, but feel free to change anything and adjust it to your perspective.
Answer and explanation:
To my mind, requiring students to volunteer does defeat the purpose of volunteering. By definition, volunteering means doing something altruistically, with no purpose related to personal gain. Personal gain, however, does not refer only to money, but to any type of compensation for the work done. Therefore, volunteering for the sake of getting a diploma ceases to be volunteering at all. Students wouldn't be doing the work to help others, but to help themselves. The action and the result are still good; after all, other people are still being helped by them. But, since the intention and motivation have been tainted, it is no longer volunteer work, just regular work.