You can use arrow keys to navigate in the map.
I like cooking my family and my pets. =/= I like cooking, my family and my pets.
Again, both sentences are grammatically correct, just with different meanings.
if I mean the same then the grammar is wrong in one
No, the syntax, the structure of the sentence is different. Neither of them is grammatically incorrect.
but they say different things
I can still understand you. In common context and especially speed reading, I won't notice your comma, and I know you like 3 items, not 2.
i didn't provide any context and i meant i like the action of cooking my family
=> you did understand it wrong => grammar does matter
Grammar is the structure of language. If there was no grammar, then what you say would lack a rigid structure. Lacking grammar would therefore severely hamper my understanding of what you are trying to say.
Formal language is important in both research documents and documents that can be used for legal purposes. If something can even slightly misinterpreted by a misplaced comma, you might find yourself on the receiving end of a nasty lawsuit.
alice hit bob =/= alice was hit by bob
But that was not an example of bad grammar, it was an example of how adding words changes the meaning of a sentence. Both statements are equally grammatically correct, or incorrect as the case may be.