The proximate cause of two 737 Max airplane crashes in fewer than five months appears to have been a single malfunctioning sensor—an angle-of-attack vane whose incorrect data caused an automated flight system called MCAS to engage repeatedly, which confused and disoriented the pilots, who couldn’t stop these brand-new, $100 million planes from plunging, killing everyone aboard. The ultimate cause, however, was a malfunctioning culture that allowed a plane to go into service with such a glaring safety vulnerability in the first place. That culture did not develop overnight; it has been growing for decades in plain sight, and fixing it will take a good deal more effort and resolve than replacing a faulty angle-of-attack vane.

For four decades, American politics and industry have been increasingly captivated by the idea that government regulation of business is generally a bad thing, and that the people best situated to set and enforce the rules are the people to whom they are applied. These few hundred deaths are a reminder of why the public is ill-served by calls to cut oversight of potentially dangerous businesses. And the as-yet-untallied cost to Boeing in reputation, reparations, and lost sales should be a reminder to businesses that they are ill-served too.

The good news is that the American aviation industry knows how to be better. Historically, the United States has been a leader in airplane safety. It is now common for years to go by without a single commercial aviation fatality in this country—a magnificent feat. How did flying, which in 1960 had an accident rate 50 times higher than today, become so safe? The answer is exceedingly boring: rules. Lots and lots and lots of rules. For many years, every time a significant accident occurred, investigators would arrive on the scene, figure out what happened, and then issue a rule. Over time, there grew to be a mountain of regulations, directives, circulars, notices, and advisories. They cover things like the time interval between inspections of a particular part, the vertical distance that a plane can fly from its assigned altitude, the age at which pilots must get physicals every two years instead of every three. To read any one of these rules is an excruciatingly boring task, and there are millions of them. Yet each is there for a reason. If any one of them were erased, lives could be put at risk.

In the interests of short-term profitability, Boeing lobbied for looser regulation, and an American government inclined to strip away the rules complied.

The urgency of a safety-first mindset is steeped into every facet of aviation. Pilots tend to be meticulous, dot-the-i-and-cross-the-t kind of people. The type who got their homework in on time, and enjoyed doing so. They understand the paradox of freedom: that you can only soar carefree above the clouds if you’ve been anal enough to check the fuel-tank sump and know that water won’t clog your fuel line.

The problem is: Regulation has gone out of fashion. As well as being tedious, regulations are also expensive. They require the commitment of money, material, and labor. One can easily imagine a struggling aviation company for which the expense of complying with regulations can mean the difference between survival and bankruptcy. If lives are at stake, so are livelihoods.

President Donald Trump is famously opposed to regulations (and indeed rules and norms generally). One of his first acts upon taking office was to declare that his administration would cut two regulations for every new one implemented. The project has been carried out with gusto. But the drive to reduce regulations was underway long before he entered the White House.

The idea that regulations hurt the economy first entered the modern political mainstream with Ronald Reagan, who ran for president in 1980 in the wake of a small recession that had brought the unemployment rate up to nearly 8 percent. Reagan blamed the Carter administration’s “continuing devotion to job-killing regulation.” In the decades that followed, the phrase job-killing regulation became a frequent rallying cry among the trickle-down set, who argued that red tape was stifling innovation and cutting into profits.

This was primarily a Republican project, but not exclusively; even the Clinton administration, which strengthened environmental and consumer-safety regulations, passed legislation that made it easier for pharmaceutical companies to introduce new drugs.

Proponents of appropriate regulations, meanwhile, struggled in a more challenging messaging environment. The benefits of stripping away regulations were immediate and obvious. The costs often come later, and are more uncertain and widely dispersed, so opposition is weaker and more diffuse.

This has had a profound effect on the airline industry. After years of strict oversight, the Federal Aviation Administration changed course. For the past decade, the FAA has embraced a policy of letting aircraft manufacturers like Boeing self-certify that their systems meet safety requirements. According to Seattle Times aerospace reporter Dominic Gates, the FAA delegated the certification of the 737 Max’s MCAS system to Boeing itself. The company’s own engineers, “authorized to work on behalf of the FAA,” conducted the safety analysis of the system, Gates writes, and “concluded that the system complied with all applicable FAA regulations.”

Four years after the engineers wrote that opinion, the system failed twice, killing more than 300 people.

It’s tempting to imagine, when it’s profitable to do so, that the rules are an unnecessary burden. That you don’t need to wear the seat belt, that you don’t need to enforce mortgage lending rules, that pharmaceuticals can be released to the public without a whole lot of fuss. Things usually work out for the best, after all. But when the partiers swinging from the chandelier bring that fixture crashing down, the party tends to end rather ignominiously.

For Boeing, that moment has arrived. In the interests of short-term profitability, it lobbied for looser regulation, and an American government inclined to strip away the rules complied. Now that laxity has bit Boeing in the ass, it has been reminded that it was boring rule following that got it the world-class reputation it once had. Whether or not it can regain a safety-first culture, and the reputation it engenders, remains to be seen. It will probably require a change of leadership, and a renewed appreciation for the importance of rules.