Why does the Apple iPad cost less than the iPhone?
There are a few factors to this.

The iPhone 8 has lot newer technologies inside it the the iPad 5.


A11 Bionic CPU vs the A9 (used on the 6s)
True Tone display
3D Touch
Better LCD used for display (supports P3)
The iPad 5’s LCD isn’t even laminated to the front glass
and a lot more changes


Even though the iPad 5 is released in Q1 2017. It is using technologies that dates back to 2015. A more fair comparison would be the new iPad Pro announced in WWDC17. Which costs similarly (just a little bit less than the iPhone 8). If you want to compare the 5th generation iPad with something, that would be the iPhone SE.