Some teachers do not bother much about spelling mistakes, punctuation or the consistency of tense in writing an essay. Priority is always given to development of ideas into paragraphs.
A very interesting question. I totally agree with @Dr. Subir Bandyopadhyay. Both grammar and the organization of the ideas are important. Organization of ideas in an essay with poor grammar or an essay with good grammar but nonsense ideas is of no use.
Thank you very much Abdullah for your excellent answer. All elements of writing an essay are complementary to one another. Punctuation, grammar and good organization of ideas create a unified essay.