Proabbaly to raise enough money for the school to also pay for that dance and also to pay for other funraisers and help donate goods and all that stuff (I researched on some online schools to see why they do this as well) Hope I helped on this because I was quite curious about this myself! :D
I would say the theme is literary. The kid who doesn't study gets a bad grade while the one who did is the first one finished. But it isn't stated explicitly (as a direct or stated theme would be). I hope this helps.