that's a set requirement for high school graduation here, but there's no factor within it that would lead to a student having to/being able to 'buy' a grade. the students seek out their placements, have to do a set amount of time, and can only do it within their junior and senior years at a charity, organization or entity the school approves of.
i don't think anyone would argue against teaching about a sense of community, what people are upset about with this situation is that no matter what purpose the teacher is soliciting the candles for she has made it clear that the students can exchange a candle for a grade (and she's set a pricing criteria that sets a monetary value on the grades).
I'm completely opposed to community service requirements for graduation. Fortunately we don't have them here, but I think they are ridiculous. My kids (and their parents) are involved in various community service activities because that's something we value as a family, but it should have nothing at all to do with school. Schools have a hard enough time focusing on teaching subject matter. They should keep their noses out of things that don't concern them, and stop trying to control how people spend their time out of school.