Children learn grammar without anybody teaching it to them. When children are little, they say "I gots a elephant." They hear older children and parents say "I've got an elephant" and a few years later they are saying "I've got an elephant."
But it takes children about ten years to learn it, and they are learning their native language almost all day, every day. And their brains may be more receptive to learning languages than adult brains.
Not all teachers teach the same way, not all learners learn the same way. But for me, some grammar is very helpful.
Linguists observe languages and discover patterns in them. Grammar is just the way they name and describe the patterns they have found. I can learn faster if someone points out these patterns to me, instead of waiting to discover them for myself. Of course, it is also necessary to absorb them unconsciously, and too much grammar can get in the way.
In my case, I was taught some English grammar in school, and my target language, Spanish, has somewhat similar grammar. When my teacher uses the terminology of Spanish grammar, I can see and make connections and relate it to my own language. That might not be true for every learner and every language.