In a circuit with the TI TPS61165, how was D2 chosen?
The datasheet you link to is for the -Q1 grade device, which is qualified for automotive applications. At times, e.g. when cranking the engine, the supply voltage can go well above 12V, therefore we must have some sort of protection for the IC since it can only safely handle 20V on its supply input. This is sometimes referred to as 'load-dumping' -- here is an application note (also from TI) that explains why it happens.

If you are certain to never see transients above 18V then you can omit D2 entirely and tie the supply input pin directly to the supply.