Writing is an art form just as unique and individual as painting. It takes skill, imagination and the talent to create a little bit of magic. Whether it's the language of a lyrical poem that lifts the soul and in some way makes the world less frightening, the fast action of a spy thriller that pushes back the boredom of everyday life, or a tender love story that touches the heart, if the magic is there, it transforms the reader in some way.
Just like painting, it requires a certain amount of skill. Even with the most vivid imagination, if your words fail to paint the pictures in your head, there's no magic. Still, like any other art form, writing isn't as simple as constructing the perfect sentence or following a set of instructions. You can't insert tab A in to slot B and come out with a best seller. Call it magic or talent, some part of what you write has to connect and resonate with the reader, expanding their understanding of themselves or the world around them. In its own way its more complicated than rocket science.
Experts like publishers and agents can't explain it, any more than an art expert can tell you how to create a masterpiece. All they can do is give you examples of what works for them. It's as individual as taste.
Weaving magic is hard work, often painful, but ultimately satisfying.