Touchy subject.
So yes, theoretically your spelling and grammar shouldn’t be as important as the story you’re trying to tell. And let’s face it: some of us who have fantastic stories inside us aren’t exactly masters of punctuation, syntax, and phrasing, right? Why should that hold us back, right?
I regret to inform you that this is also part of the craft and that it IS part of your responsibility as an author.
If you know your story’s amazing but you also know the compositional aspects of writing aren’t your strong suit, you are still going to be beaten out by authors who can do both, and you are still going to primarily encounter publishing professionals who expect you to have cleaned up your manuscript by yourself. They don’t want to do that job for you if you haven’t cleaned it up reasonably on your own.
So if you keep getting that comment, don’t get salty about how the story is what’s important–we know that, but we also don’t expect to dig through sloppy construction to get to it, and really excellent storytelling does incorporate the art of word choice, finesse, and polish. I’m saying this because I REALLY WANT those of you who do not excel in this to still have a chance, and I urge you to hire a professional (or ask a grammar nerd friend!) to spit-shine your manuscript. If you really do have a precious gem in there like you believe you do, that luster deserves to come out. Don’t let the publishing industry decide your work isn’t good enough just because you think they should be willing to do extra cleanup for you.
Treating your book as if it’s an exception to the industry’s rules or expecting special treatment for it is a great way to ensure you’ll never get the attention you want, need, and may deserve.