Va a estudiar medicina por seguir la tradición familiar.
Le dieron el trabajo por ser el primo del director.
I think these sentences would be better translated as:
She is going to study medicine because it's the family tradition.
He was given the job for being the manager's cousin.