Why would you attach a Diode to the base of a BJT?
It is there to keep the transistor's current less susceptible to temperature changes.  

In the case of Q1:

Suppose that instead of having R1 and D1, Q1base was connected directly to ground.
Emitter current would be: 
$$ I_{e} = \frac{20V - V_{be}}{R_{2}}$$  

You can see Ie is susceptible to variations in Vbe, which has a known dependency on temperature (T), so you might as well express it as:
$$ I_{e}(T) = \frac{20V - V_{be}(T)}{R_{2}}$$  

But with the diode, if they are matched and thermally bonded:
$$ V_{diode}(T) = V_{be}(T) $$

So now:
$$ I_{e} = \frac{20V+V_{diode}(T)-V_{be}(T)}{R_{2}} $$
Which simplifies to:
$$ I_{e} = \frac{20V}{R_{2}} $$
Independent of Vbe, and its variations with temperature.

The diode is effectively providing the little voltage offset that would be needed to compensate for Vbe changes with T, in order to maintain a constant current.