Technical writing is a skill you can learn. If you have somebody pointing out what you are doing wrong structurally, you can learn to do it right every time. I had a Ph. D. supervisor who taught me that little life hack thirty years ago. I was a bit depressed with my lack of progress when he pointed out just four or five things that I was doing wrong a lot. So, I fixed those things and it got better and developed the skill of spotting my own mistakes.
The whole process took something like six months or so to get to acceptable levels (by review committees for conferences and workshops). Learning to communicate is a big part of the process of getting a Ph. D. A master degree won't quite get you there (depending on the field). Especially computer scientists seem to have a few blind spots for this. Anyway, if you can't talk about your findings in a coherent way, nobody is going to bother listening to you.
Literary writing is more free form. Technical writing skills are merely the starting point for that. But it's like any art form where somebody that has mastered rules and skills start bending the rules in intentional ways; or even change them. Some authors I like make that look easy to the point where I wonder whether I could do that. But doing that well is not easy.
And there's also the notion that it's not just about the style and form but about the content. After a life of ignorance about Greek mythology, I read Stephen Fry's Mythos over the summer. His writing is wonderful. But it also drove home the point of how ignorant I was of Greek myths influencing basically every popular movie or book I've ever liked. I like the Matrix, for example. There's a reason Morpheus is called Morpheus (Greek god of dreams) and that whole business with the blue and red pills relates to that. That whole movie is dripping with Greek mythology references and it's not like they were subtle about it. I kind of knew of course.
Movies and books don't just come out of nowhere. They are variations of stories that have been told and retold over and over again by countless people for thousands of years. And the better authors tend to know their mythology, philosophy, work by their modern peers, etc. Learning to write involves a lot of reading so you can refer to that and be original and intentional.
I guess this comment proves my style is run on sentences :)