This happened with the iPhone 5 as well when the 5S and 5C were released, logic being that the 5C serves as an exact-replacement for the 5 (minus the plastic shell).
In this instance, the iPhone XR serves as a hybrid upgrade of the iPhone 8/8 Plus and the X.
Don't let "discontinued" confuse you for warranty/parts/repair. Those will still be readily available. Heck, every single iPhone X on the planet is still under the standard one-year warranty (excluding those who have violated the terms).