It is an important component of any language not only English.
If you acquired lots of vocabulary and learned to pronounce English correctly, but you didn't know how to form correct sentences then your English is likely to turn incomprehensible for the receiver.
If you said for example:
" I was learned English on my friend while 2 years."
Having used the wrong tenses and prepositions , this sentence sounds pretty odd ,incomprehensible and doesn't convey your message. Grammar puts the words in the right order and helps you use the correct tense,preposition, adjective ,adverb etc to precisely express what you want to say.
It is an essential part of learning English without doubt!