Spend per pupil is uncorrelated. It's about the quality of parents first, the morals and values they instill in their kids (or don't - they are a reflection of their parents successes or failures).
https://www.brookings.edu/articles/a-state-level-perspective...
Rich parents spend hundreds of thousands a year to control for one factor: just to keep their "average" offspring away from noisy and distracting troublemakers whose parents can't get their life together enough to even do the basic parenting. You wouldn't throw your puppy into a pool of sharks, so why would you put your kid in a suboptimal and potentially dangerous place if you can afford otherwise?