From what I understand, it was because she conspired to remove Elizabeth from the throne. But this begs the question - she was a Queen in her own right, so why would it be 'treasonous' for her to do something like that and not mere statecraft that a monarch was expected to be engaged in. After all, as a Queen, she wasn't a subject of Elizabeth. On whose authority was the execution based?
The first thing to recognize is that Mary was no longer a queen by the time of her execution, and had not been one throughout her imprisonment in England. She had been forced to abdicate from her throne in 1567 by members of the Scottish nobility (including her half-brother Earl of Moray) because of her continued Catholicism in an increasingly Protestant Scotland, her unpopular marriage to Lord Darnley (and his subsequent scandalous murder), and her marriage to the Earl of Bothwell shortly afterward. She had been imprisoned in Scotland by her son James VI’s regents and fled to England following a failed attempt to retake her throne. Elizabeth allowed her into the country but had her placed under watch because she was suspicious of Mary’s motives. Mary had already laid claim to the throne of England before and was considered by many to be the most legitimate heir to the throne if Elizabeth were to die. Her marriage to Darnley had been a deliberate attempt by Mary to further cement her claim to the throne (Darnley was considered the next most legitimate heir following Mary) and had been undertaken despite Elizabeth explicitly opposing the union. Furthermore, Mary was an ardent Catholic while Elizabeth was a devout Protestant who already feared a Catholic revolt coming from the north of England (a perpetual problem during the English Reformation period) and indeed, shortly after Mary arrived in England such a Catholic revolt happened. Due to this uprising, Mary’s previous claim to the throne, and unanswered questions surrounding Mary’s involvement in Darnley’s murder led Elizabeth to try to push Mary to reaffirm her abdication of the Scottish throne and to an alliance between Elizabeth and Moray (James VI’s uncle and chief regent). Mary was subsequently placed under house arrest for 18 1/2 years. Following the revelations of the Babington Plot (for much more info on that, check out John Guy’s “Queen of Scots” or John Cooper’s “The Queen’s Agent: Francis Walsingham at the court of Elizabeth I”) Mary was placed on trial.
As you pointed out, Mary claimed that as a monarch what she did was an act of war and therefore legitimate. However, this was her final attempt to muster a defense in a trial that was skewed against her from the very beginning, Mary’s conviction was largely a forgone conclusion. Even if the commission had been willing to listen to Mary’s defense, the claim to being a reigning queen would have trouble gaining traction after over 18 years in exile in a nation that had chosen to ally with her usurpers. The question as to why they chose treason is a little less clear, but it certainly would have been the easiest way for them to guarantee an execution with conviction.
The decision to have her executed was eventually agreed to by Elizabeth, but it took her quite some time to reach the point of authorizing it. Indeed, she actually attempted to slow down the commission charging Mary for as long as possible and it took an act of Parliament demanding Elizabeth execute her that eventually led to her signing the warrant. Elizabeth was very aware of the possibility of being accused of regicide and after signing the execution warrant tried to avoid having the warrant given to the executioner and that she be executed at the request of her secretary so she could claim being removed from the decision. The Privy Council eventually met without Elizabeth’s knowledge and decided to send the execution warrant without the queen’s knowledge. It was reported that Elizabeth was furious that they went behind her back but could also rest easy in knowing that blame could not be placed on her. So the question of under whose authority she was executed is a rather complicated and contrived issue as Parliament, the Queen and the Council all played parts in authorizing the execution, even if Elizabeth’s role was more reluctant.