They aren’t mistakes. They are good phones that clearly still have at least some demand judging by the response here. The truth is that it’s a bridge product. Since the X is such a radical departure the 8 is here to bridge the gap between the two generations.
What others seem to be conflating, is that Apple is not going to just offer a $1000 iPhone X that they know the majority cannot afford. The iPhone 8 is still an upgrade from Older model iPhones for many and is widely more available. You have to configure that the majority don't upgrade on an annual basis either. Which is why I don't believe that Apple intended on manufacturing iPhone X for every iPhone user to upgrade to annually because of the price point, but eventually OLED will be across their entire lineup at one point.