He should dedicate an offering
To the deities there.
Venerated, they venerate him

A few verses on how to become “beloved of the gods” get a framing narrative glorifying the Magadha Kingdom.

Many Buddhist kingdoms (down to the present day) create (or promote) apocryphal stories to justify their Buddhist bona fides, and this sutta may be such an example from King Ashoka’s time.