I'm reading a book about how to introduce healthy food choices in everyday life. Here, the author is talking about healthy food choices in american elementary schools.
We later learned that three of the town’s elementary schools had replaced fund-raisers involving candy sales with “walking marathons” in which kids got donations for participating. One school raised $20,000—every penny of which it got to keep.
I don't understand the meaning of the last part of the sentence.