The grammar schools "were" great - but the secondary moderns were not. They assumed that there were no late developers, and no children who were off-colour or stressed at the dividing point. There needed to be flexibility and re-allocating a year or two later, when some woke up to what direction their future lay.
The system was an improvement on what went before - which was either state school until 14 and then out into the big wide world, or private education for as long as parents could afford it, followed by University for those who could pass entrance exams and pay their own fees. There were scholarships and bursaries for clever children without funds (my father and his brothers all won them for the private school which later became the LA grammar school that I went to later)
If some children are "creamed off" to get more intensive lessons in more "brainy" subjects, then those who are not interested in that kind of learning must get lessons that stretch them in learning more of what is their interest and talent. Practical skills, music, art, caring professions, all these need well-informed people with the ability to master specific skills. We can't all design IT systems, but some of us will spend our lives using them - and so on.
A good split system will give a good education in all sections. A bad system will leave some uneducated - whether it is grammar/sec-mod or comprehensive. A good comprehensive will give a comprehensive education with whatever combination of elements suit the needs of that particular child, and a chance to change priorities as time goes by.