News is starting to come out that it was less the building codes themselves than their enforcement or lack thereof, sometimes even on new buildings. Technical details about building codes don't really belong here, but enforcement and political will to tackle the problem is on topic.
Stricter safety standards were also brought in following the 1999 earthquake around the city of Izmit, in the north-west of the country, in which 17,000 people died.
The latest rules require structures in earthquake-prone regions to use high quality concrete reinforced with steel bars. Columns and beams must also be distributed to effectively absorb the impact of earthquakes.
These laws, however, have been poorly enforced.
"In part the problem is that there's very little retrofitting of existing buildings, but there's also very little enforcement of building standards on new builds," says Prof Alexander.
...
The recent construction means it should have been built to the latest standards, updated in 2018, which require structures in earthquake-prone regions to use high-quality concrete reinforced with steel bars.
We have seen similar issues in countries with poor governance however. It can sometimes be easier to bribe inspectors than do it right. Turkey's Transparency International corruption rating is iffy and has been trending down. And, similar questions were asked after the 1999 earthquake.
The code was updated at least twice, in 2007/2017 (my local building code also has 10 year update cycles wrt earthquakes as risks are better understood and building engineering progresses):
Turkish experts agree that new buildings’ constructed in compliance with 2007 and 2017 earthquake regulations reduced destruction relatively, but they highlight that the measures taken did not go far enough.
And bribes may not even have necessary either, as the government seems willing to consider compliance avoidance as a profit center.
She explained that as part of the 2018 zoning amnesty, licences were given to buildings built before 2017 which may not have adhered to building codes or zoning, in return for a fee paid to the government. In Turkey, 13 million structures were legalized under this law.
Keep in mind before criticizing overmuch: this earthquake was quite violent. And it is quite costly to retrofit older existing buildings, so saying that it should be done in all cases is unrealistic.
Where I live there used to be quite a long list of complaints about the seismic readiness of schools, but the government has slowly been fixing them. Older rental stock is quite vulnerable, but since housing is in short supply...
Also, not sure about earthquakes, but plenty of post-mortem on forest fires in the NorthWest/California shows that there is plenty of apparently-random variability on outcomes - one house might be left standing amidst a patch of razed identical houses. Don't read too much into isolated pictures.
Last, but not least, earthquakes are hard to compare to each other. We see a headline number - the magnitude. But that is at a point location, where it happens, not necessarily where a city is located. If we take hurricanes, no one is going to say Oh, Hurricane Gabriella was 320 kph at peak (at one location) and look how well Miami withstood it. (fictitious example). They'll speak of winds at Miami.
Kobe, Japan in 1995 had 6.9 and 6000+ deaths IIRC, which might compare badly to Los Angeles, 6.7 in 1994, 50 deaths. But is it fair to say that Japan is 100x less well prepared to earthquakes than California? Few would make that claim and it would take some more work to make meaningful comparisons.
That all said, Turkey's government under Erdogan is not exactly covering itself with glory on disaster response and maybe a comparison to Kobe is warranted, where Japan dithered needlessly (one Japanese military officer had to act on his own initiative to send in his troops, IIRC, when central command wasn't doing anything).
In fact, Reuters reports the same about Turkey:
Nasuh Mahruki, founder of a search and rescue group active in response to the 1999 earthquake that killed 17,000, said the army did not act soon enough because Erdogan's government annulled a protocol enabling it to respond without instruction.