Because our species derives from irrational ape-like ancestors and entirely too many of us don't realize we're now an ant colony.
Yes, 10,000 years ago our monkey brains were just fine at navigating the world as it existed. They're not just fine at it today. Today, even some of the simplest jobs require advanced skills in disparate areas, and frankly about 16% of the entire world population is not up to the task. Sixteen percent is the amount of the world population with an IQ at or under 85. These are people who struggle with tasks as simple as folding a sheet of paper into thirds, more or less perfectly, and then placing it into an envelope.
The world we live in, and almost certainly the world we're creating, has no place for these people. Even something as simple as receiving merchandise on a dock in a warehouse requires some basic computer skills, from either operating a Windows or Linux machine and interfacing with SAP, Oracle's JD Edwards, or IBM's AS/400, to figuring out the proper layout of boxes on a wooden pallet to maximize storage space of the warehouse. Something your grandfather or great grandfather did with a 6th grade education, now requires a minimum of a high school education by necessity, if not by design.
That brings me to actual answer to your question... because they don't have the decency to lay down and die. Because inside every human is an irrational desire to live, even when you're no longer useful. I know, know... a long argument can, and likely will, be made that "every life is valuable", etc., so forth. I understand and even accept those arguments on an emotional level, because I am not a machine - I am a man, and because I find it morally repugnant to allow people to die because they have no economic value.
That said... clearly there are plenty of others who do not feel the same way. If you work on AI to streamline a process or aid in manufacturing, you feel this way. The people who employ you, feel this way. You cannot design an algorithm that replaces 7,800 jobs and then throw your hands up and say, "I'm just doing my job." We either have to decide that everyone is worthy of life, regardless of their intellectual abilities and their economic contribution, or we have to decide that's not the case. Right now, because no one is taking Universal Basic Income seriously, we're clearly deciding that your value is mostly - one could argue almost entirely - economically based. We have a few exceptions to this that I can think of off the top of my head - the clergy seem to provide some kind of non-productive "good" that enough people, in America at least, feel is worth the cost of supporting them. But the factory worker who makes widgets for your ConsumerGoodX that you bought, she apparently does not.
I would like to be wrong about this, but our actions as a society say otherwise. We reward companies that reduce their "human capital" and return the money that would be spent on those salaries to either expanding their operations or in dividends to their shareholders. We reward them with higher stock prices and increased demand to purchase those stocks. We reward them by purchasing their goods. We tell ourselves another story, because if you really thought long and hard enough about it, you'd likely have to do some serious soul searching. Most of us don't want to do that.