It actually is quite costly, but usually it brings in more then enough to support itself. They were going to eliminate it at my alma mater and figured out they’d lose rougly $5000 a year, after cost of the team and decided against it. If the team makes the play-offs, they usually make a bit more.
I've long advocated the separation of sports and academics at the high school level. Athletic teams could still be affiliated with schools in some way, but let the participants pay all of the costs associated with those sports.