It’s only $200 more than the plus sized iphone 8. For that, you get OIS on both back cameras instead of just one, you get all the facial unlocking stuff (IR cameras, IR lasers, etc), and you get a OLED screen which costs Apple about $75 more than the IPS screen in the 8+.
It’s not hard to see the overall cost of the extra stuff in the X add up to around $140. Apple always sets their profit margin on phones to around 40%, so if their costs go up $140, they raise the price $200.