The short answer is an LED is designed for maximum output efficiency. Efficiency typically being even dispersion thru a certain viewing angle. That reason is why you see LED's with a dome or a form of lens. While some LED's might appear to lack a lens those designs can use a very specific reflective material under the phosphor substrate that achieves the same as an encapsulating lens yet still yields an increased efficiency.
There are some very informative articles available on line that will do a much better job than my simplistic explanation.
ETA; I forgot one of the most important reasons for some LED designs with a lens. It takes a square die and converts it to a round projection.
Comparing the Cree HD models against their HI cousins, HD offers higher output (i.e., more lumens), while HI provides lower output, but more throw (i.e., higher candela).
Note that the "regular" XP-L is actually the XP-L HD.