Well, Morocco can hardly be called a democracy [1]. It's easier to (literally) bulldoze through obstacles when you're a kingdom looking for a fancy toy for the ruler to show off, compared to building infrastructure in a democracy.
Many of these projects were started in times where the needs of the infrastructure had priority over local objections and environmental protection laws were not much of a thing though. There's a reason most of Europe's rail network is decades, sometimes centuries old, and there hasn't been much new construction for a loooong time.
Which in Cali would mean SF to LA, and that is probably not going to happen.