The most important reason why Mary was a threat to Elizabeth's reign was the fact that Mary was Catholic. Elizabeth had reinstated Protestantism as the official religion of England when she inherited the throne, but that did not mean that there were not still Catholics residing in the country. If those Catholics decided to rebel against Elizabeth then they could use Mary as a figurehead, as was the case in the Throckmorton plot of 1583. This threat was increased by the fact that the Catholic religion did not recognise divorce so Catholics, like Mary, claimed that Elizabeth was, in fact, illegitimate and that Mary was, therefore, the real heir to the throne.
Of course, that argument was only possible because Mary was a legitimate heir to the throne as she was descended from Henry VII. However, this fact is of secondary importance because if Mary had been raised protestant rather than Catholic then she would not have been a focal point for plots against Elizabeth. Mary's faith also increased foreign threats to Elizabeth's reign. When Mary was married to the Catholic Dauphin of France, France declared Elizabeth a bastard and Mary the rightful Queen of England. Later, after the Anglo-Spanish alliance broke down Catholic Spain also supported Mary's claim over Elizabeth's. Of course, there does exist an opposing argument that it was Elizabeth's own weaknesses that allowed Mary to become a threat. If Elizabeth had married and provided an heir then Mary's claim would have been weakened. While this could be seen as true, it would still not overtake Mary's religion as the primary causal factor for the threat. When James VI of Scotland, a Protestant, became Elizabeth's heir the relationship between England and Scotland was peaceful and there were no plots to replace Elizabeth. This was despite the fact that James was actually Mary's son rather than Elizabeth's. Therefore, it was clearly Mary's position as a Catholic that was the main reason that Mary was a threat to Elizabeth's reign.