It was, but that has nothing to do with name "grammar school". In the liberal arts tradition that goes back to the ancient Greece, you studied grammar, logic, and rhetoric to learn to think and argue properly. Those were considered prerequisites to learning anything real. Grammar was considered the most fundamental of the three, which is why it was taught in the lowest-level schools.