As for iOS, Apple controls the whole stack. Whatever ML they do, they do it only on devices capable of that level of ML.
I can buy the cheapest android I can find with a 10 year old mediatek processor and search for pictures of my dog and it'll show it. There is a value to doing the heavy things on a heavy hitting server.