I have quite an old samsung tablet that, when I keep wifi and bluetooth turned off in LineageOS, has just this week surprised me as I had fully charged it and hadn't used it in about a month or so, it still had 70% battery life left. It may have even been closer to two months, I can't be sure.
But if I leave the wifi on, even with syncthing/etc not running at all, it will last about as long as you'd expect an unused android tablet to.
I'm sure it's many tricks adding to one great feat, but I've always guessed that many of these devices could probably be better optimized for what is ironically their primary use case: using low amounts of power in standby while still able to relay important information as needed.
But if that's any part of the apple magic, how does the trick work, and why aren't more devices doing similar things?