Why is the 5d orbital instead of the 4f orbital filled in lanthanum?
According to Ground-state configurations of ionic species I through XVI for   Z = 57-74 and the interpretation of 4d-4f emission resonances in laser-produced plasmas Phys. Rev. A 25, 275 (where "I" means the neutral atom) :


  We begin therefore by showing in the left-hand
  columns of Table I the configurations given by
  Martin et al. for lanthanum through lutetium.
  Here it is seen that at the fourth spectrum the 4f
  level has in all cases fallen below 5d and 6s. This
  is due to the well-known phenomenon of 4f wavefunction
  collapse [reference 5]. The effective potential in
  which the 4f electron moves is made up of an attractive
  Coulomb term and a repulsive centrifugal
  term, which, in general, combine to give a double
  well potential, the height of the intervening barrier
  depending on the nuclear charge Z. For neutral
  atoms the field in the region of the outer potential
  is essentially hydrogenic. The occurrence of the
  neutral lanthanides coincides with the appearance
  of bound 4f levels in the inner well, which, in turn,
  is due to the deepening of the well and the lowering
  of the potential barrier as a result of the increasing nuclear charge.


Here, "reference 5" is Spectral Distribution of Atomic Oscillator Strengths Rev. Mod. Phys. 40, 441 which goes into quantitative equations for the attractive Coulomb term and a repulsive centrifugal term.