Because of her gender?
More like because of her core values, toughness, and track record, and despite (or more accurately, without regards to) her gender.
McCain picked a Veep who adds strengths and balances him very well.
Obama picked a Veep who adds no substance and reinforces his own weaknesses.
This selection was primarily based on her gender. If it was a man with the same level of experience in the same state of Alaska, they would not have even been considered by McCain.
For those not so knowledgeable on the Palin subject she defeated an incumbent Republican Governor in the primaries.