And they're both great examples of a sexist trope that uses a female lead to tell what is essentially a male story. Giving the appearance of female representation without actually making her a hero of her own story.
Women are not allowed to be great, only to witness to the greatness of men.