Because the factories are already set up to make DDR4. Retooling to make DDR5 will cost a lot of money and take a lot of downtime for which the factory isn't making anything. So the companies are extending the life cycle of the DDR4 production lines, without needing to upgrade things or retrain workers. As long as people are buying it, then there's money to be made by staying open.
It's like being the burger restaurant next to the steak restaurant when the line for the steak restaurant is 3 hours long. You'll get a lot of spillover from people who don't want to wait, and you can benefit from that without necessarily turning into a steak restaurant yourself.