The digital pins of the Arduino can only source 40mA, the 5V rail can source much more than that depending on supply.
The LED blew up because you did not have a current limiting resistor. See here. When you attached 5V across the LED it likely tried to pull amps of current and instantly smoked. See this relationship.
See how if you apply 5V, the current it would try to pull is exponentially higher than 40mA. The LED you used was likely rated for 20mA continuous. Poof
Additionally, if you put a voltmeter across the LED when connected to the digital output, you would not read 5V, likely around 2.2V if you used an LED with a similar curve to the generic one I posted. This is due to the arduino limiting the current to 40mA.