I think what others said about the writers not thinking it through and the canon being wobbly is the right answer. But I had a thought about what it might be if we were to assume it's intentional:
Starfleet might have tiered selection processes based on the circumstances of the applicant. As we're talking about a distant future utopian society, I'm going to assume their education process in Starfleet Academy is good enough that they don't actually care how many facts Wesley knows. Those can be taught. They're trying to pick out the best and brightest. But they probably also want to maintain Starfleet's population as a whole as reasonably representative of the federation so that in times of war they are motivated to fight for the whole federation. They would also have advanced social sciences and are well aware of structural biases like privilege. Taken together, ill conceived entrance requirements could lead to a nepotism/caste of generational spacer families serving in Starfleet. That would be bad for the diplomatic side of the federation as then they'd be more loyal to the institution of Starfleet than the federation, and then the protection of Starfleet amounts to "trust me bro" when negotiating with prospective new member worlds who will want their people serving across Starfleet.
Those taken together means yes it makes sense to have a small and highly restricted and competitive pool for those who are the kids of senior officers serving in prestigious posts and granted unique educational opportunities.