Uhm, you do know how government supported school systems work, right? I mean, the headmaster gets a budget and distributes it (mostly salaries and potion ingredients, food and stuff (some extra books too) because reparing things and stuff can be done by magic). Honestly I thought it was weird that the students always had to buy their books, we just always got them from the school for one year.
Also the budget was probably hughe, since it's the ONLY school the ministry has to support