Devas and asuras are often introduced to outsiders as gods and demons, and the shorthand survives because the two groups do spend most of Hindu myth fighting each other, most famously over the elixir amrita churned from the ocean of milk. The doctrine itself is more particular than that shorthand allows. In the Puranic genealogies both groups descend from the same sage, Kashyapa, through two co-wives, Aditi and Diti: the devas are Aditi's children, the asuras Diti's, and the conflict between them reads less like a war between good and evil than a succession dispute inside one extended household, closer in shape to a rivalry between cousins than to a fight against an alien evil. Individual asuras such as Prahlada and Bali are devout, virtuous and eventually honored even while belonging to the losing side, which a doctrine of an absolute moral gulf between the camps cannot easily explain.
Buddhist cosmology keeps both terms but relocates them. Devas and asuras stop being the outcome of a family quarrel and become two of the destinations a being's own karma can produce, ranked among the realms of rebirth alongside humans, animals, hungry ghosts and hell beings, though the canonical lists vary on whether the asura realm counts as a sixth realm on its own or is folded into the others. An asura in this framing is not evil so much as unlucky: a being whose pride and jealousy, carried over from a former life, land it in a realm defined by perpetual low grade conflict with the devas above it, still bound to samsara and still capable, in a future life, of being reborn as a deva instead. What was ancestry in the Hindu telling becomes moral temperament in the Buddhist one.