This is still just one data point. Can you compare your public HS experience to your private HS experience? Can you compare public school A to public school B? Private A to private B?
A school being private doesn't magically make it great. It has to still work hard for that. A public school being good requires hard work too. But let's be honest, usually it boils down to parent involvement which is usually fueled by economic status. Rich(er) people have time and/or resources to actually be involved in their kids lives. They also tend to have fewer kids so more time/resources per kid. The initial thing a private school does these days is pool the rich(er) cohort of kids together.
I live in a part of my city known as the 'private school corridor' because there are so many. And, the public schools are notoriously horrible in the city's ISD. So, it's pretty much required if you have the means. The other alternative is to move to a suburb (different ISD), but even those are pretty easily seen as correlating good school districts with high home prices. Yet, I've seen studies in my area that say if everyone sent their private schooled kids to the public schools they would average out and be pretty well rated. But it's a first mover disadvantage to do so, so nobody does.
I also live in the south and this whole private school thing really started during integration, so there's that whole issue to contend with too. The impacts of red lining and white flight are pretty stark here. I don't think it's the motivating factor for most people any more, but inertia.
This is why our public schools have stats like "5% white" and "86% low income" on Great Schools. 5% white seems really low, the city is ~56% based on another google search.