According to Steve Jobs, as quoted in Walter Isaacson's excellent book, Henry Ford once said, "If I'd asked customers what they wanted, they'd have told me, 'A faster horse!'" Jobs' point was that his goal at Apple was to give customers what they didn't know they wanted: a personal computer, a graphic user interface, an iPod, an iPhone, an iPad.
This is essentially the job of the screenwriter. You have to give producers what they didn't know they wanted. Chasing what producers think they want is usually a waste of energy. What they say they want today, they won't want by the time you write a script. Likewise, when networks give you notes, they don't want to have to solve problems for you. You're supposed to solve the problem for them.
You have to be aware of the market, but not chase the trends of the market. You have to write to please yourself, because if you don't please yourself, you'll write crap no one wants. Of course you can't sell something that no one wants. But sometimes your gamble that people don't know they want your crazy creative idea -- yet -- pays off better than the familiar thing that everyone else is working on.
(I doubt the quote, because Ford wasn't the first to build a car. He was the first to build a modern assembly line.)
Read the book, by the way, it's pretty cool.