It is extremely simple LumenHound.
Uber basic stuff, kinda like we learned in middle school or kindegarden (it has been many decades so I forget which). Some children learn it long before this, by observing nature.
The light comming off the die hits the lens at an angle that is near perpendicular, thus you get maximum light extraction.
If you alter the shape the light extraction drops, due to the light hitting the lens exit surface at the wrong angle, and a portion or all of it gets reflected back in- all in the case of reaching the critical angle and having TIR take over. Anything that gets kicked back ends up with high absorption losses on the reflection, and will likely bounce around inside of the package many times before it makes it out- or is fully absorbed.
Now, you can take a OSRAM Golden Dragon or Platinum Dragon, and glue a half dome to it, and actually get 10-20% more light out of it.
Take the basic luxeon and then go look up the lumen output of the side-emitter, you'll see it looses just over 10% of its output. However, with the dimensions they have, and everything inside being highly reflective, they do not suffer much loss due to reflections, like in the batwing.
The exact position of the dome on the CREE XR-E, and the shape and focal point are specifically matched to maximize the light extraction. With the CREE, you really want to get the light out the first time. Take a look inside the package sometime especially a non-white one.
Think about the optics, like the NX-05, and how they work, to understand TIR a little. A laser and a fishtank works great, or even a fish tank/mirror/sunlight.