I have worked with many through-hole LEDs over the years. I ordered a bunch for a personal project. I did not notice until I went to solder them onto a PCB that the leads could not be inserted the way I'm used to doing. This was because the leads had enlarged sections, square in cross section, and larger than the standard hole diameter.
I was able to work around the problem by clipping the leads immediately below the flared sections. I had just enough of the leads remaining to solder the components to the board. It was a hassle.
I've never encountered these flared leads before. What is their purpose?
EDIT:
Thanks for all the answers. I see that the question has been asked before. I searched, but didn't find the older questions.
And I can see that both of the possibilities I considered are found in the upvoted answers. There's some evidence that they're thermal standoffs, and also some evidence that they're artifacts of cheap manufacturing practices.
I have four colors of LED, from three manufacturers. They all have flared leads. Only one of the four data sheets has a footnote which references the flares. This one data sheet says that the flares are important to keep the body of the LED off the PCB during soldering. Presumably, there are materials in the LED with CTE mismatches and something could crack?
I was quick with the soldering iron. I managed to solder all 100 diodes to my board without causing any visible damage. They all work.
I was avoiding SMT LEDs in my prototype. If I had known that through-hole LEDs had become more fussy, I might have just jumped straight to SMT.