The iPad Pro’s get a suped up version of the processor that is in the flagship phone. Don’t let the name of the proc fool you, it’s not weaker than the phone. Think of it more as an overclocked version of the phone or that the phone is underclocked due to heat. As others stated iPhones generate more revenue so they get the proc first.
I think people thought the 2017 iPad Pro’s were weaker because the name A10x on the proc. But that particular A10 proc was near low end desktop benchmarks and was faster than the iPhone 7 proc. The new A12 is even closer to desktop levels, the A12x will probably meet desktop benchmarks in small bursts.