I would guarantee they come from a home with involved parents that prioritize education. Or, as I stated, you get out
what you put in. I would imagine those that are getting 5's are either naturally brilliant, or they have gone above and beyond what public schools require. You get out what you put in. You can get a good education at a public school if you want to. But you can still get by with straight A's even if you don't.