system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do people put resistors for LED lights, when they can function when connected directly to a power source?
gpt
A LED has a forward voltage, if your power source is below that voltage, you get very little current, and the light doesn't turn on. If you're above that voltage the LED doesn't limit the current, and burns out instantly. If you're very close to that voltage, you might get away with relying on the resistance of your wires and traces, but that's a rather extreme cost cutting measure, and if you're running on something like a battery with variable voltage, doesn't give good results.

A "white" LED might have a voltage drop of 3 volts. If your power source is 5 volts, then there is a 2 volt drop across your resistor, if you don't have a resistor, that 2 volt drop is effectively short circuited. Maybe your power source can limit the current to a safe number, maybe it can't. Adding a resistor to the LED lets you control that current, a 20 ohm resistor would drop the current to say 100mA.

There are more efficient ways to drive LEDs, but you always need to control current somehow, so you'll still have a very low value resistor in series with the LEDs, so your driver knows how much current is flowing through them.