5V 100mA from a 25V input using a linear regulator is 2W. It would be silly to dissipate that much heat in a TO-220 part, IMO. If you want to use a linear regulator, get rid of some of that voltage drop in a power resistor. This is much more reliable than sticking heat sinks on the regulator and crossing your fingers. This is like taking a honda civic and putting in a 10.0 liter V8, but using it to generate 90% heat and 10% power.
I've stuck a D2PAK 7805 on a 20V rail to power 20mA. Just an indicator LED and a microcontroller, so I figured it would be ok to be lazy. This was plugged in 24/7. It worked a couple of years before it died. Come to think of it, I also had a heatsinked TO-220 7805 on a 20V rail powering just a panel meters and a couple micros. When not in use, the panel meter was turned off, so it was really just a couple micros on there sipping power. There were a few holes drilled in the enclosure over the heatsink, but no fan. The regulator died in about a year or two. As I recall, it died at least twice, which is why I added the heatsink and the holes.. and eventually learned to use a series power resistor. 2W is nothing to a resistor that is happy to continue working at 70C, indefinitely. It is a lot to an IC.
I vaguely recall someone trying to explain to me why this is bad, like 12 years back, at the time I did such things. That dropping 10's of volts in a linear regulator is not ideal, and the regulator might flake out years down the road. Well, I had to learn the hard way, but at least only on one-off stuff that was easily fixed.
Wraper is on point on all his posts. FWIW, the Hakko 888 also uses a half-bridge for the control circuitry.