Lego 'lost the plot' for quite a number of years and their only drive was to sell more (poorly designed) sets to survive financially, rather than to see what drove people to buy those sets in the first place: the fact that their kids wanted them. Branching out into the upmarket sets for adults and older kids (large Starwars sets, modular houses and architectural sets such as the London Bridge) was pretty clever as well: you have to sell far fewer sets to people with much deeper pockets to make money that way.
The idea of 'free bricks' such as were available in software was a thing that horrified Lego management, and that's why they couldn't have invented Minecraft. If they had it would have been buried deep. The obvious next step was to allow anything created in such an environment to be immediately orderable, Lego experimented with that for a bit, shipping 'MOC's, but ended up having to withdraw it due to overwhelming success. Obviously that is something you should then fix but instead the idea was - as far as I know - abandoned.
> The idea of 'free bricks' such as were available in software was a thing that horrified Lego managemen
It seems that 'free bricks' in general horrifies them. I went to visit one of the biggest sellers of Lego in Norway and they had been told that Lego no longer wants stores to sell plain lego bricks, but only Lego sets. Which for me seems rather strange.
My step-mum ran a small toyshop a few years ago. She could only order limited numbers of plain lego bricks and the amount was dictated by the number of expensive fancy sets she bought.
It's not strange. Sets have high margins and their logistics can be optimized to hell and back. Loose pieces are low-margin and awkward to deal with. It's the same reason you cannot buy Coca-Cola, or milk, on tap from a supermarket.
Given that the Lego patent has expired and there's plenty of "off-brand" sets out there now, the market is free to fill this gap; it just needs a quality producer, because most of the knockoff stuff is just crap in comparison. A big one could be Minecraft, if they were to produce bricks and brick sets. They'd have to stop charging the merchandise premium though.
The idea of 'free bricks' such as were available in software was a thing that horrified Lego management, and that's why they couldn't have invented Minecraft. If they had it would have been buried deep. The obvious next step was to allow anything created in such an environment to be immediately orderable, Lego experimented with that for a bit, shipping 'MOC's, but ended up having to withdraw it due to overwhelming success. Obviously that is something you should then fix but instead the idea was - as far as I know - abandoned.