There was a period starting in the late 90s to late 2000s when special effects, stunts and set pieces were thought to bring in the money. I remember quite a few summer *cough* Michael Bay *cough* blockbusters in that era were rumored to have been written only after the action sequences have been filmed and the role of the story was simply to link the separate action sequences into some semi-coherent story.
I think its no coincidence that those blockbusters did not do as well as hoped in the box office. I think Joss Whedon's Avengers have shown that movie audiences do put as much stock in a good story as good action sequences. So hopefully going forward, writers will get more say.