I have them both. They are two completely different devices with different use cases. The iPad is a general purpose tablet whereas the Switch is a gaming device.
The obvious problem with gaming on an iPad, or any Apple mobile device, is lack of physical buttons. Yes, I know there are 3rd party peripherals but there are a few big problems with having to rely on 3rd party controllers in order to build a gaming market for your device:
1) The quality is almost always less than something that Nintendo/Microsoft/Sony would come up with. The Switch Pro Controller is one of the best controllers I've ever used.
2) They won't be integrated nearly as well as a device that was designed from the ground up to have physical buttons built in. The Switch's detachable joy cons are integrated really well, plus Nintendo gives you the option of using a great 1st party controller.
3) Only a small subset of the market will buy the controllers. Game developers need to cater to the lowest common denominator which means making games designed primarily with garbage touch screen controls. Any support they add for 3rd party peripherals will be an after thought and not done as well if the game was designed just for them.
Yes, the iPad Pro is most likely more powerful, has a much better screen, etc. However, I can't think of a single iPad game I'd rather play over any one of my Switch games... and I only have 5 games for it. Gaming is simply a better experience on the Switch. I have no problem with having to buy Nintendo hardware to play Nintendo games.
It's the same reason why the AppleTV will never replace a gaming console. It doesn't come with a real gaming controller. Thus, the perception is it's just a streaming box that plays iOS games. It could have an i7 and a GTX 1080ti inside it and that perception wouldn't change.
The only way to get the big name developers to make real games (i.e. not watered down mobile ports) for your devices is to sell a device that's first and foremost a gaming device that is designed for gamers and Apple will never do that.