Because reasons. The Tapus and Magearna are some of only a few Pokemon to not learn Rest and to tell the truth I'm not sure why. For Koko and Fini it'd be totally useless unless they're facing another terrain, and all four of them don't have the best bulk in the world but I can't possibly fathom why Magearna doesn't get it since a Rest Talk set on it could work.
The following Pokemon cannot learn Rest:
Pokemon incompatible with TMs (Beldum, Burmy, Cascoon, Caterpie, Combee, Cosmoem, Cosmog, Ditto, Kakuna, Kricketot, Magikarp, Metapod, Scatterbug, Silcoon, Smeargle, Tynamo, Unown, Weedle, Wobbuffet, Wurmple, Wynaut)
Regigigas
Spewpa
Komala
Tapu Koko
Tapu Lele
Tapu Bulu
Tapu Fini
Magearna