Bandgap references are designed by using a circuit which has both a factor (usually a voltage) that increases when temperature increases (PTAT) and one that decreases (CTAT) when temperature increases. using those two factors the temperature dependence of voltages can be cancel out to the first order. For temperature sensors what you need is either just the PTAT or the CTAT circuit, and the best way to do this is by using the base-emitter voltage of a BJT since it's temperature dependence is kind of linear.
Regards,
diemilio