I'd say her character was the biggest mistake the series ever did. In reality, her character is more like the historical Princess Mary Tudor (daughter of King Henry VII) instead of her older sister Margaret. In the show, she makes it clear to her brother, that she wants to marry someone that she chooses after being promised to an old king.
So she goes through the marriage to an very old King of Portugal while she really wants to marry the young and dashing Charles Brandon.
She can't stand her royal groom, and secretly murders him just a few days later.
She then quickly marries Charles Brandon, one of Henry's good friends. This causes her sister to be banished from court, and Charles Brandon's life to be possibly ended by the wrath of the king.
But both are spared and eventually are welcomed back by the King. Then she finds her new marriage to be unhappy.
So she ends up dying alone while Charles has an affair with some woman. In reality, Princess Mary had given Charles children (one of their grandchildren became "Queen of England" for a few days, Lady Jane Grey) and the real Margaret married the King of Scotland and her great-grandson James became King of England after the death of Queen Elizabeth I. Apparently the show writers didn't want to confuse people as Henry's daughter was also named Mary, because Mary was his favorite sister.