Well, I would imagine that being forced to sleep for a thousand years at a time is a good enough law.
On a serious level, anonymous, it’s difficult to say. If you believe in the Kalosean teachings, Xerneas and Yveltal are embodiments or guardians of their respective concepts, just as Suicune is the embodiment of the North Wind or Ho-oh is the guardian of the sun and reincarnation cycle according to Johtonian teachings. Thus, while birth and death do indeed happen regardless of whether or not either legendary is directly involved, they both are needed in order to maintain the balance and natural order of both.
Alternatively, their roles as the guardians of life and death are merely metaphors, and the actual pokémon merely possess abilities that coincide with those concepts. It would be akin to how arcanine was once worshipped as guardians of Heaven and wards against evil spirits thanks to their ability to use Roar against attacking pokémon. The difference is, of course, that all legendaries are significantly stronger than most ordinary pokémon, arcanine included, so if they are metaphors, they are such because their abilities are far more effective than anything out of “mortal” pokémon. Any dark-type can kill, for example, but Yveltal’s Oblivion Wing can do it the most effectively.
Finally, either way, it would still be difficult to say on the basis of how vague the concept of a purpose actually is. While I firmly believe that every creature has a purpose of one sort or another, it’s an intimate concept. It’s impossible for others to know what your own purpose is; only you can discover that for yourself. In much the same way, any legendary-class pokémon knows why it was created and what it was meant to do. We can only guess using our own culture, history, and personal beliefs. So perhaps Yveltal really is the guardian of death, Xerneas the guardian of life, and Ho-oh the guardian of the reincarnation cycle. Perhaps not. That would be for them to know for certain. The ultimate question is: what do you believe, all things considered?
