"Wasn't that the main thinking behind them originally?"
It was all down to the 1944 Education Act. There was even a booklet printed in 1945 by HMSO entitled 'The Nation's Schools: Their Plan and Purpose' which explained some of the background thinking.
There were grammar schools and very academic schools prior to 1944 though
Following the 1902 Education Act which created county secondary schools it was found that they were following a very academic curriculum, similar to the grammar schools. Around half of pupils attending these schools gained entry through a competitive exam and the other half paid tuition fees.
Prior to the war around 40% of school leavers from these county secondary and grammar schools did not take any exams at all (the School Certificate exam, forerunner of O Levels) and 25% even left before the age of 16.
Even back then, they were saying that there were concerns that not enough talented people were going into industry compared to the professions
"There is a further point, too, that relates directly to the health and welfare of our national life. The education thus provided leads mainly to the clerical and black-coated occupations. It finds little natural outlet on the industrial side. Under the present system, the children who are judged to be the abler and brighter have been transferred to the secondary schools at the age of 11+. Their ability has thus been drawn very largely into professional, clerical and office occupations. Industry on the production and manufacturing side has to that extent been deprived of its reasonable share of the national talent - a loss which a country so highly industrialised as this cannot afford to carry."
There were concerns (probably quite rightly) that an office job was more secure than a factory job and so more pupils were trying to get that sort of job.
But they believed that would change with the introduction of National Insurance and, if anything, there would be less need for grammar schools.
"With the extension of national insurance and a greater feeling of social security, such considerations as these will come to have less weight, and "grammar" school education be less eagerly sought in future in preference to other types which for many children, indeed, a substantial majority of children, are probably far better adapted to their real aptitudes, and more closely related to the world in which they will be living. Having regard to the fact that already the existing schools provide a grammar school education for a considerable number of pupils who clearly cannot derive full benefit from it, it is reasonable to suggest that at present, taking the country as a whole, there is no occasion to extend this type of secondary education."
So it was very much an acknowledgement pupils shouldn't get to go to a grammar type of school unless they could "derive full benefit" from it academically.
.
Beyond that, before 1944 most pupils left school at age 14. There were what were known as 'Central Schools'. These were designed for those who didn't get a place in a grammar or county school. These focussed on technical and commercial skills such as shorthand and bookkeeping.
If a pupil didn't get in to a Central School then they attended a 'Senior School' until they were 14.
.
So, all of that was then transformed into the system afterwards of grammar, secondary modern and technical school.
.
"To give a chance to children who were clever but came from poorer backgrounds so would not, in any other way, be able to access appropriate learning opportunities."
That may have been the aim, but the reality was very different.
There was no real difference in the makeup of what sort of families sent their children to grammar schools before and after the Education Act.
In the 1950s it was observed that many poorer families did not want their children staying at school for an extra year instead of earning money.
It was also believed in the 1950s and 1960s that the then 11+ tended to benefit families with relatively highly educated parents. Not to the extent of tutoring that goes on today but they perhaps were more invested in their children developing those skills needed to pass the 11+, such as the use of language, correct grammar and sentence logic.