Aim to be hired on your merit. Yes, it’s expedient to be hired based on other things, but it will never be as pleasing and will rarely make you proud.
You’ll feel better about yourself if you come second on your merits than first by having some strings pulled.