Several reasons.
- In most cases you don't actually need the maximum power of the LED.
- The LED may be able to take 25mA, but LEDs are often driven directly off logic outputs which can't supply that kind of current.
- Your LED has a high forward voltage, probablly because it's a blue or white LED. Typical red/green/yellow LEDs tend to be more like 2V.
- The closer to the line you run things, the more careful you have to be. Particularly if you are designing kits or tutorials for those new to electronics, it makes a lot of sense to err on the side of safety.
With a typical LED 330 ohms will give you around 9mA on a 5V supply which is fine for most LEDs, on a 3.3V supply that drops to around 4mA, a bit on the low side but probablly still sufficient for most modern LEDs. With a blue/whote LED on 5V you will also get around 4mA which again is probablly fine.
With a 3.3V supply and a blue/white LED, the supply voltage is about the same as the nominal forward voltage of the LED, so it's difficult to predict the current. There will be current, because the forward voltage of the LED does reduce at lower currents and there likely will be visible illumination, but at this point the resistor value is not the main thing setting the current, the characteristics of individual LEDs are.
In summary 330 ohms is a decent "general purpose" LED resistor value if you just want to light a LED from a digital output and don't want to think too hard.