In his play Henry VI, Shakespeare paints Gloucester in good light and vilifies the Beauforts, especially Somerset. Why would he do that, given the Tudors, direct descendants of the latter, were his audience?

by divilly

Taking into account his other plays, notably Richard III and its virtuous depiction of Richmond, it seems to me Shakespeare was under heavy influence of the powers that be. What happened in this one instance?

Astronoid

The Tudors / Stuarts of Shakespeare’s time (Elizabeth I and James I) were, via Henry VII’s marriage to Elizabeth of York, descended from both sides in the "Wars of the Roses", which frame the story of Shakespeare’s Henry VI trilogy. They were not descended directly from Edmund Beaufort, 2nd Duke of Somerset, who was killed at St. Albans, rather from his father John Beaufort, 1st Duke of Somerset, via Edmund’s sister Margaret Beaufort who married Edmund Tudor, Earl of Richmond. The wars were a series of conflicts among blood relations with infuriatingly similar names and titles. Before touching on Shakespeare’s 16th century motivations with Richard III, a little background may be in order.

In the 14th century Edward III and Philippa of Hainault made lots of healthy babies, who made many healthy babies of their own, some of whom married each other, etc, so that by the mid 15th century there was a vast network of related magnates, all with some degree of royal blood, all with opinions, desires, and grievances. This multitude did not gather into clearly defined opposing forces until the reign of Henry VI, probably the kindest, gentlest, and most inept man ever to sit on the English throne. During Henry’s long minority (he was crowned at 9 months) political unity was maintained among his Lancaster and Beaufort uncles, but powerful men operating for so long in the absence of a central authority, developing their own political / military followings (called affinities) planted the seeds of militant factionalism. As the uncles died off and Henry took control of the government, a new generation of nobility found themselves either with or against the court party surrounding the King. This court party included Edmund Beaufort, duke of Somerset, and Queen Margaret of Anjou. (To explain Margaret very simply - Henry wasn’t King, Margaret was. His marriage to her was unpopular, but I think unnecessarily complicated to get into for this question.)

Political opposition to the court party centered on Henry’s cousin Richard, Duke of York. York was descended from Edward III on both sides of his family and was one of the wealthiest landowners in England, second only to the King, and with a vast affinity behind him. His descent made him heir apparent in light of Henry and Margaret's un-fruitful marriage. York was also much better at doing "king stuff" than his soft-headed cousin. He was very effective as the king’s deputy in France, succeeding in a war the court party hoped to end. This made him a threat to the court party, Somerset in particular. Both he and York were related to the King in similar degrees; Somerset was among Henry’s chief advisers while York was politically marginalized. York was replaced in France by Somerset (who proceeded to screw everything up) and sent to govern Ireland, a crap assignment at which he actually excelled. Enmity betweed York and Somerset pushed political differences toward military conflict. I believe I can answer followup questions about the Wars of the Roses but it’s a quagmire of names and battles and I’m trying to stay on topic (actually I’m just trying to finish a decent answer, but I can expand if needed).

Shakespeare was working from a well established narrative of the Tudor succession. Connection to both sides of the conflict was central to that narrative. So was vilification of Richard III, York's younger son who usurped the crown after the death of York's heir, Edward IV. It was believed at the time (and is almost certainly true) that Richard arranged the murder of his nephews, rightful heirs to the throne. This is what turned his allies against him and ignited Henry Tudor’s ambitions. Shakespeare portrays Richard as the deformed villain imagined in late medieval popular culture and described in many chronicles contemporary to Richard’s lifetime, not least of which is Thomas More’s biography of Richard, written during the reign of Henry VII. To the extent that Tudor propaganda framed the story, Richard is the necessary foil to Henry Tudor’s victory. Shakespeare places him in situations where he couldn’t possibly have been (Richard is portrayed fighting at the battle of St. Albans at a time when he was barely out of diapers) just to give him the opportunity to express his malign ambitions. Tudor ascendency didn’t demand that every Plantagenet in the Wars of the Roses be portrayed either positively or negatively, but Richard III was the monster of 16th century English imagination.