The phone itself does not cost more than the iPad or iPad Mini. What you are paying for is the opportunity costs of Apple selling you an unlocked iPhone. You’re not strengthening their relationship with a partner company, you’re not winning them any kickbacks from that partner company, and you are getting an iPhone with more directly available features by getting it unlocked (which Apple has consistently struggled against). Those are things they’re going to make you pay for (and reasons to consider how badly you want an iPhone).
It’s also worth considering that technology is a market that tends to favor small over large and more software over more hardware. The iPhone is smaller and can do things that the iPads cannot. So as far as the device market goes, many people are going to see it as a superior product. “Bigger is better” has never been a very good rule for judging anything—despite how many people seem to be stuck in that sort of thinking—but it’s especially inapplicable to the technology market. We moved on from ENIAC for a reason. No one wants to carry around an 1800 square foot calculator.