Since its inception, LEDs are driven by a constant voltage or current with some compensation for temperature fluctuations. As the power grid works on alternating current, a rectifier circuit is required, in virtually all cases combined with a DC convertor. This convertor changes the level of the rectified electricity to the required voltage to drive the LED. This type of circuitry is constructed along the principles of a switched mode power supply, which requires a reactance (inductor or capacitor). And by its very nature, a reactance spoils the powerfactor of the total device, leading to reduced power efficiency. Inductors are not the most welcome components in mass production as the require special handling. Capacitors may be more production friendly, but their lifetime is always a trade-off against cost.
The electricity running through the LED produces not only light, but also heat. More power through a LED means more luminous output. More power means also more heat. With increasing temperature LEDs operate less efficient: an increase of 40 degrees in temperature (not uncommon for an LED) reduces the luminous output with a factor of 10! Therfore LEDs need cooling. A 20W LED may need as much as a 300 cubic cm cooling.
So, recapitulating, LED lamps contain more than just a slice of a semiconductor diode that emits light. LEDs contain driver electronics and cooling elements. LED lamps contain carefully constructed technology, which limits lifetime, reduces design versatility and increases costs.