Private schools should get to make their own rules.
Public schools... well, we pay for ‘em, after all, so why not? Personally my kids will be kept far far away from anything to do with government schools including sports teams but other people make different choices. Often a school team is the only local team available to a kid so that makes it really hard to argue they shouldn’t be allowed to play. If the school team is the de facto community team, what’s a homeschooled kid to do?
There are plenty of rules which restrict tax payers from participating in school activiies.