IMO the grammar school system worked for the majority those children lucky enough to pass the 11-plus exam.
The trouble is that unless your parents could afford to pay for extra tutoring to get you through the exam or you went to a "good" primary school which helped you prepare to take the exam then your chances of passing were limited.
For sure some working class children slipped through the net, but generally grammar schools were a way for middle-class children to get a free education equivalent to one they could get at a minor public school.
Heaven help you if you were a "late bloomer".
I'd have likely passed the 11-plus, I was precocious and my parents were teachers, but I went to comprehensive school with a lot of kids who would have been consigned to the Secondary Modern and their academic education would have been at an end. A fair proportion went on to get good O and A levels and have a successful university career. These are the real beneficiaries from the comprehensive system - bright, hard-working kids from poor backgrounds.
Being dim and lazy, I can see how Liz Truss didn't thrive under such a system