United Airlines recently had a rough week, but not as rough as one of its passengers. Dr. David Dao received a concussion, a broken nose, and two broken teeth after airport police forcibly dragged him off the plane he had boarded only a short while earlier.

As you have probably heard by now, the airline needed to get four crew members from Chicago, Illinois to Louisville, Kentucky for a flight the next day and decided to boot four passengers off the plane after nobody volunteered to give up their seat.

In light of the ensuing publicity disaster, it would have been cheaper and better for United (UAL) to buy four Porsches and let the crew members drive to their destination.

Courts will sort out who owes what to whom—however, I have a different angle.

One In A Million > Zero

Theoretically, United and all other airlines have the right to give your seat to someone else under certain conditions. It’s in the fine print. If you buy a plane ticket, that’s what you’re agreeing to in their “Contract of Carriage.”

It’s a take-it-or-leave-it proposition: Accept their terms or go away.

Those contracts, drawn up by high-paid lawyers, cover every imaginable scenario (even the one-in-a-million ones) to protect the company—not the customers.

Whether or not United acted within its right to remove passengers from the plane, the airline staff who asked Dr. Dao to deplane—and then called police when he refused—certainly thought they were right.

Complex Machinery

An airline is an incredibly complicated machine with a zillion moving parts: planes, passengers, crew, luggage—and all of it must be in certain places at certain times, or the whole thing will fall apart. It’s remarkable when you think about it.

Modern airlines operate at the scale and speed they do by automating all those little details. Computer algorithms make many of the decisions; people just execute them.

The computer knows the rules, but it’s not perfect. One of those one-in-a-million scenarios will arrive eventually—or worse, several consecutive ones.

I suspect that’s what happened with United.

Several different processes converged. Computers issued instructions and people responded. No one wanted violence, but a series of flawed decisions produced it.

Things like that happen when you don’t build an adequate error margin into a complex system.

Occasionally, conditions will combine to create results no one wants or expects.

Here’s the scary part.

Airlines aren’t the only industry to depend on complex algorithms. So do banks, brokerages, utility companies, hospitals, pharmacies, health insurers, governments, and more.

All these organizations let their algorithms make complex decisions in rapidly changing conditions. They work fine… until they don’t.

Everything’s Awesome Until Not

Algorithms now emit financial news and analysis. Other algorithms read it. Yet other algorithms launch trades a millisecond later.

Maybe you own one or more exchange-traded notes (ETNs). They look a lot like exchange-traded funds (ETFs). What most people don’t know: Aside from the fact that ETFs and ETNs both trade on exchanges, they’re entirely different species.

  • An ETF is an “investment company,” a corporation or trust legally separate from the company that sponsors and sells it. If the sponsor goes bankrupt, the ETF survives under new management.
  • An ETN, on the other hand, is a kind of bond. Instead of owning a slice of a big portfolio, you have loaned your money to a bank. The bank promises to repay you based on an index. They explain all this in the disclosure documents, but few people read them.

Eventually, one of those banks—which depend on algorithms much like United does—will fail, and those who hold its ETNs will have to stand in line with other unsecured creditors, hoping to recover some of their investment. Good luck.

This Problem Will Get Worse, Not Better

We already let algorithms decide who gets a job, whether you can get a loan and on what terms, what funds go in your retirement portfolio, whether that spot on your MRI is cancer, and more.

That’s not always bad. In fact, it’s usually helpful and sometimes life-saving.

The latest “deep learning” artificial intelligence systems teach themselves how to do these things. They learn fast without human teachers. (We’re more like the textbooks.)

One thing AI systems can’t do, however, is explain why they decided X is better than Y. We have to trust them on that.

Most of the time it works out well. Occasionally, it doesn’t. If you are the unlucky person interacting with the system at that moment, you might get a result like Dr. Dao’s.

I don’t think stopping progress is the solution. We probably couldn’t stop it even if we tried.

So, we’ll see more of these events where complex processes produce ridiculous or even harmful results.

Welcome to Neverland.

FREE PREMIUM REPORTS: 3 Stocks You Need (and 3 You Don’t) in 2017

Discover the best and worst stocks in 2017. This bundled series of exclusive reports reveals three companies set to soar and three you should steer clear of (one of them will surprise you). Download Three Deadly Dow Stocks and Three Top Picks for Income & Growth for free now.