Politics, patronage and parsimony (aesthetic parsimony, that is) always limit composition. Let's take the last two first. In the Renaissance, which has produced an astonishing amount of great artworks, the patrons, whether they be sacred or secular, were very precise and demanding of the artists. We have accounts of commissions where the exact weight of gold leaf to be incorporated in the painting was specified. Music was commissioned on specific texts for specific occasions for an exact fee. Sometimes composers were compensated in indirect ways as well, such as when Guillaume Dufay was given a sinecure post in a cathedral he was never expected to even visit, but there was never any doubt about who was calling the shots and what they expected in return. Modern patronage is more subtle, perhaps, but no less demanding. If you are writing exactly the kind of music expected, for the right artists in the right venues, then you can expect funding from the arts bureaucrats. The irony nowadays is that the arts bureaucracy tends to expect that you write music that genuflects in the correct directions. This may be as true in New York as it is in China. Whereas in China, digging into unsavory aspects of the life of Sun Yat-sen seems to be anathema, in New York, as we see in this other item from Alex Ross which begins with a clip from a performance of Frederic Rzewski's Coming Together by Mos Def and the Brooklyn Philharmonic, it is welcomed that composers take up the causes of the day--in that case the Attica riots of 1971. Annoying the bourgeoisie seems to be required nowadays if you want the arts bureaucracy to consider you a 'serious' artist. The bottom line, now as ever, is that he who pays the piper calls the tune.
Aesthetic parsimony, and I wonder if I am the first to use those two words together, is just the fundamental aesthetic principle that you use minimal resources for maximal effect. It is an aesthetic principle that is discovered early on, as soon as you start analyzing music by Bach or Beethoven and are astonished to discover that Bach can turn out any number of preludes, each one based on one simple theme. Beethoven can generate a whole symphony using little more than one interval--a falling third--and a simple rhythm. Not only CAN, but the power of the resulting work derives from the economy of means. Then this lesson is heavily underlined by student composers' first attempts when they discover that the more different ideas they throw into the piece, the more diffuse and confusing it becomes. So limits on creative freedom are important. We must be careful to notice, however, that these kinds of limits are self-imposed.
Politics has become more and more a factor in the arts. It didn't arise in earlier times because art was commissioned largely by individuals and artists were expected to flatter their patrons and not do the opposite. No mystery there. But since the French Revolution music has often been handed a truly political role. One thinks of the festivals of the revolution and the anthems and marches that accompanied them. Music can have a powerful effect in uniting large groups of people, something that totalitarian regimes, whether in France under the Terror, or in the Soviet Union or modern China, have not failed to notice. Shostakovich was required to write patriotic works of socialist realism such as his Second, Third, Eleventh and Twelfth Symphonies. When he went outside the boundaries, as with his opera Lady Macbeth of the Mtsensk District, he risked not only his career, but his life. My suspicion is that composers like Shostakovich really didn't have a single political conviction worth mentioning. He was nearly kicked out of the conservatory for satirizing the questions on a test having to do with Marxism. If he was required to write something political he did it. Pieces like the Fifth Symphony, written to rescue his career after a political ban, are immensely complex pieces of music and to interpret them as either Stalinist or anti-Stalinist is absurd. For a brilliant discussion of this whole question please see Richard Taruskin, "Public lies and unspeakable truth: Interpreting Shostakovich's Fifth Symphony," in Shostakovich Studies ed. David Fanning.
The problem of politics and music becomes acute when music adopts a progressive ideology as it did in the 20th century. Composers who write music in the correct 'language' are acceptable, those who do not are not. I suspect that some composers did, idealistically, adopt the progressive ideology (for the official theorist, see Theodor Adorno), others, like Shostakovich, did what they had to, to survive, while others just held their finger to the wind and realized that if they did such and such, nice grants and commissions would come their way.
My view can be summarized succinctly: music and politics are quite different things and if you try and mix them together both of them suffer.