Matt Welsh, a former Harvard professor who moved to Google, and who writes the Volatile and Decentralized blog, has some interesting observations on this topic: http://matt-welsh.blogspot.co.uk/2013/04/the-other-side-of-academic-freedom.html.
As he points out, there are at least four constraints that must be simultaneously satisfied:
- What you can get funding to do;
- What you can publish (good) papers about;
- What you can get students to help you with;
- What you can do better than anyone else in the field.
Wise words of advice that should be heeded, especially by early career researchers! I found the discussion in the comments as interesting as the main post.