Let's take Kroger, for instance...largest grocery chain in the US. They added pickup a few years back and started rolling it out everywhere before the pandemic....started pushing delivery to keep up with Walmart. They charge delivery fees, but not always pickup fees with minimums. They have a decent app and like all the grocery stores that use the cards you swipe, they are using the app now for better JIT inventory control. They can do that much more directly, rather than leaning on 3rd parties. So, yes....for inventory control and more direct interaction with customers, it may be advantageous to handle delivery internally.
The outsiders like instant cart may not be able to compete unless it's a super busy store and the store itself can't maintain fast enough service (ie. Run out of appointments regularly).