If you want to be a published author, you need to prove you are a serious writer by writing a great query. Think of a query as a sales pitch, because that is precisely what it is. A well-written query will let an agent or publisher know that you are serious about being published and that your book is just what they are looking for.
If you query is concise, compelling, and grammatically correct, the agent or publisher will naturally want to learn more about your book and request a sample.
If your query is sloppy or fraught with errors, what does that say about your writing? Or how you view yourself as a writer?
Queries can take many forms. Don't be deceived into thinking an email query can be slap-dashed together with run-on sentences, spelling errors, and poor grammar and then sent off to an agent or publisher with favorable results.
Always put your best foot forward when contacting a potential agent or publisher whether it be on the phone, on social media, email, or formal letter. Show the receiver of your communication that you are a professional, one that they'd be crazy not to want to work with and not the other way around.