When we DIY a LED light, unless we are very skilled with soldering tiny electronic items, we need to use LEDs mounted on star or similar heatsinks. Factories that make LED lights can use bare LEDs, which are quite a bit cheaper, cheaper still when bought in bulk, for the same performance. The soldering can be automated or semi-automated in a factory.
We have a limited number of LED drivers to choose from, and those get expensive when you use 2 or more on one light fixture. Factories that make LED lights can make, or have made drivers that match their LED circuits exactly, and in volume, cost a lot less.
We DIYers tend to overdesign when selecting a heatsink, but finned aluminum extrusions are expensive, especially those made specifically to be used for LED lights. Factories that manufacture LED lights can use very good design techniques, combine the heatsink and fixture housing, and match the heatsink capability very closely to what the LEDs actually require, further reducing the cost.
The initial pre-made LED lights tended to be made by people who seemed to have no idea how much light we need, so many of their lights were way underpowered. Others were designed for the major users of aquarium lights, reefers, so those were overpowered and the wrong color temperature for our use. At that time DIY was very much better. Today, there are several planted tank LED lights being sold that were designed by people who knew what they were doing, so DIY is no longer that much better, if at all.