I doubt anyone here can give you a definitive answer because it's not a black and white subject. Non-profits, including PTOs, conduct business a lot of different ways. Mostly it all goes back to what their stated purpose is and do the activities conform with those purposes?
As far as "legal", it's not like you could just call local enforcement to complain about the way the PTO runs its operations. If the PTO failed to pay sales tax due, it could be fined by the state. If they violate their non-profit purpose, the IRS could theoretically take away their 501(c)(3) status. But it’s not as if a policeman will show up at a meeting and tell them they can’t do something.
As Anne said above, it's usually not a good general practice to funnel funds through the organization. Tends to muddy the water and set a precedent you may not want to have. Then again, a PTO may decide that supporting a group in the manner is consistent with it's mission.
For example - I sit on the Board of a very formal 501(c)(3) charitable foundation. There was an (unrelated) grant program phasing out that reimbursed students for college testing fees and $65,000 was available for the last year if they could find someone to take it on - otherwise, the funds would be lost. A CPA and at least one lawyer are officers in this organization, so we have lot's of professional guidance.
Even though that program is not usually part of this group's function, it decided it could be included under its mission and agreed to manage the funds for that one year during the transition. The grant funds were deposited with the organization and later were dispensed to the grantees.
Similarly, a PTO might have dedicated pockets of funds. For example - if the PTO helps with school field trips and one grade is raising extra money for a special field trip, the PTO might manage those funds and keep it in reserve for that grade because it fits with programs to which it is committed.
It's for your group to decide what appropriately falls under its umbrella.
Important note - once your group DOES accept such a program - it then has responsibility to make sure the funds are managed appropriately, taxes paid if due (such as sales tax), good accounting practices used, etc.
I would think the sport program or the sport boosters would hang on to the money in their account. I think it could get alittle confusing if the two groups used the same money, or it could raise problems. Some of the other groups may question why the sport teams are getting money while the band class is not.
Is it legal for a school sports program to have fund raisers and turn the money over to the pto? And then when needed the sports program use the money.