The word asura is used in rigveda and samaveda as an meaning,"lord" or some kind of praise as if it was a bad it was used for vritra too in rigveda but the word deva represents the original special designation for devas and adeva or only asura remaining for daityas.
The story from chandogya upnishad which i already gave in previous answer when merged with wikipedia gave rise to it.
So, the gods were those who got the true knowledge and where the asuras went with their bad philosphy became ungodly and thus having their previous designation while their brothers devas brcome deva (godly).
ये देवा सो दिव्येकादश
स्थ पृथिव्यामध्येकादश
स्थ ।
अप्सुक्षितो महिनैकादश
स्थ ते देवासो यज्ञमिमं
जुषध्वम् ॥११॥
O ye eleven gods
whose home is
heaven, O ye eleven
who make earth your
dwelling,
Ye who with might,
eleven, live in waters,
accept this sacrifice, O
gods, with pleasure.
– Translated by Ralph
T. H. Griffith
— Rigveda 1.139.11
The story discribes it:—
As we know Indra spent 101 years with Prajapati uderstanding the self whereas the demon king from the first time getting an answer as the body is the self got away but indra came again and again to Prajapati after getting an answer and spend 101 years with Prajapati learning self and that's why gods are all prevalent.
CHANDOGYA UPNISHAD BOOK:VIII
SEVENTH KHANDA
- Prajapati said: 'The Self
which is free from sin, free
from old age, from death
and grief, from hunger and
thirst, which desires
nothing but what it ought
to desire, and imagines
nothing but what it ought
to imagine, that it is which
we must search out, that it
is which we must try to
understand. He who has
searched out that Self and
understands it, obtains all
worlds and all desires.'
- The Devas (gods) and
Asuras (demons) both heard
these words, and said :
'Well, let us search for that
Self by which, if one has
searched it out, all worlds
and all desires are
obtained.'
Thus saying Indra went
from the Devas, Virokana
from the Asuras, and both,
without having
communicated with each
other, approached
Prajapati, holding fuel in
their hands, as is the
custom for pupils
approaching their master.
- They dwelt there as
pupils for thirty-two years.
Then Prajapati asked them:
'For what purpose have you
both dwelt here?'
They replied: 'A saying of
yours is being repeated, viz.
"the Self which is free from
sin, free from old age, from
death and grief, from
hunger and thirst, which
desires nothing but what it
ought to desire, and
imagines nothing but what
it ought to imagine, that it
is which we must search
out, that it is which we
must try to understand. He
who has searched out that
Self and understands it,
obtains all worlds and all
desires." Now we both have
dwelt here because we wish
for that Self.'
Prajapati said to them: 'The
person that is seen in the
eye, that is the Self. This is
what I have said. This is
the immortal, the fearless,
this is Brahman.'
They asked: 'Sir, he who is
perceived in the water, and
he who is perceived in a
mirror, who is he?'
He replied: 'He himself
indeed is seen in all these
.'
EIGHTH KHANDA.
- 'Look at your Self in
pan of water, and whatever
you do not understand of
your Self, come and tell
me.'
They looked in the water-
pan. Then Prajapati said to
them: 'What do you see?'
They said: 'We both see the
self thus altogether, a
picture even to the very
hairs and nails.'
- Prajapati said to them:
'After you have adorned
yourselves, have put on
your best clothes and
cleaned yourselves, look
again into the water-pan.
They, after having adorned
themselves, having put on
their best clothes and
cleaned themselves, looked
into the water-pan.
Prajapati said: 'What do
you see?'
- They said: 'Just as we
are, well adorned, with our
best clothes and clean, thus
we are both there, Sir, well
adorned, with our best
clothes and clean.'
Prajapati said: 'That is the
Self, this is the immortal,
the fearless, this is
Brahman.'
Then both went away
satisfied in their hearts.
4. And Prajapati, looking
after them, said: 'They both
go away without having
perceived and without
having known the Self, and
whoever of these two,
whether Devas or Asuras,
will follow this doctrine
(upanishad), will perish.'
Now Virokana, satisfied in
his heart, went to the
Asuras and preached that
doctrine to them, that the
self (the body) alone is to
be worshipped, that the self
(the body) alone is to be
served, and that he who
worships the self and serves
the self, gains both worlds,
this and the next.
5. Therefore they call even
now a man who does not
give alms here, who has no
faith, and offers no
sacrifices, an Asura, for this
is the doctrine (upanishad)
of the Asuras. They deck
out the body of the dead
with perfumes, flowers, and
fine raiment by way of
ornament, and think they
will thus conquer that
world.
NINTH KHANDA
1. But Indra, before he had
returned to the Devas, saw
this difficulty. As this self
(the shadow in the water) is
well adorned, when the
body is well adorned, well
dressed, when the body is
well dressed, well cleaned,
if the body is well cleaned,
that self will also be blind,
if the body is blind, lame, if
the body is lame, crippled,
if the body is crippled, and
will perish in fact as soon
as the body perishes.
Therefore I see no good in
this (doctrine).
2. Taking fuel in his hand
he came again as a pupil to
Prajapati. Prajapati said to
him: 'Maghavat (Indra), as
you went away with
Virokana, satisfied in your
heart, for what purpose did
you come back?'
He said : 'Sir, as this self
(the shadow) is well
adorned, when the body is
well adorned, well dressed,
when the body is well
dressed, well cleaned, if the
body is well cleaned, that
self will also be blind, if
the body is blind, lame, if
the body is lame, crippled,
if the body is crippled, and
will perish in fact as soon
as the body perishes.
Therefore I see no good in
this (doctrine).'
3. 'So it is indeed,
Maghavat,' replied
Prajapati; 'but I shall
explain him (the true Self)
further to
you. Live with me another
thirty-two years.'
He lived with him another
thirty-two years, and then
Pragapati said:
TENTH KHANDA
- 'He who moves about
happy in dreams, he is the
Self, this is the immortal,
the fearless, this is
Brahman.'
Then Indra went away
satisfied in his heart. But
before he had returned to
the Devas, he saw this
difficulty. Although it is
true that that self is not
blind, even if the body is
blind, nor lame, if the body
is lame, though it is true
that that self is not
rendered faulty by the
faults of it (the body),
- Nor struck when it (the
body) is struck, nor lamed
when it is lamed, yet it is
as if they struck him (the
self) in dreams, as if they
chased him'. He becomes
even conscious, as it were,
of pain, and sheds tears.
Therefore I see no good in
this.
- Taking fuel in his hands,
he went again as a pupil to
Prajapati. Prajapati said
to him: 'Maghavat, as you
went away satisfied in your
heart, for what purpose did
you come back?'
He said: 'Sir, although it is
true that that self is not
blind even if the body is
blind, nor lame, if the body
is lame, though it is true
that that self is not
rendered faulty by the
faults of it (the body),
- Nor struck when it (the
body) is struck, nor lamed
when it is lamed, yet it is
as if they struck him (the
self) in dreams, as if they
chased him. He becomes
even conscious, as it were,
of pain, and sheds tears.
Therefore I see no good in
this.'
'So it is indeed, Maghavat,'
replied Prajapati; 'but I
shall explain him (the true
Self) further to you. Live
with me another thirty-two
years.' He lived with him
another thirty-two years.
Then Prajapati said:
ELEVENTH KHANDA
- 'When a man being
asleep, reposing, and at
perfect rest', sees no
dreams, that is the Self, this
is the immortal, the
fearless, this is Brahman.'
Then Indra went away
satisfied.in his heart. But
before he had returned to
the Devas, he saw this
difficulty. In truth he thus
does not know himself (his
self) that he is I, nor does
he know anything that
exists. He is gone to utter
annihilation. I see no good
in this.
- Taking fuel in his hand
he went again as a pupil to
Prajapati. Prajapati said to
him: 'Maghavat, as you went
away satisfied in your heart,
for what purpose did you
come back?'
He said: 'Sir, in that way he
does not know himself (his
self ) that he is I, nor does
he know anything that
exists. He is gone to utter
annihilation. I see no good
in this.'
- 'So it is indeed,
Maghavat,' replied Prajapati
'but I shall explain him (the
true Self) further to
you, and nothing more than
this . Live here otherfive
years.
'He lived there other five
years. This made in all one
hundred and one years, and
therefore it is said that
Indra Maghavat lived one
hundred and one years as a
pupil with Prajapati.
Prajapati said to him:
TWELFTH KHANDA
- 'Maghavat, this body is
mortal and always held by
death. It is the abode of
that Self which is immortal
and without body. When in
the body (by thinking this
body is I and I am this
body) the Self is held by
pleasure and pain. So long
as he is in the body, he
cannot get free from
pleasure and pain. But
when he is free of the body
(when he knows himself
different from the body),
then neither pleasure nor
pain touches him'.
- 'The wind is without
body, the cloud, lightning,
and thunder are without
body (without hands, feet,
&c.) Now as these, arising
from this heavenly ether
(space), appear in their own
form, as soon as they have
approached the highest
light,
- 'Thus does that serene
being, arising from this
body, appear in its own
form, as soon as it has
approached the highest
light (the knowledge of
Self) . He (in that state) is
the highest person (uttama
purusha). He moves about
there laughing (or eating),
playing, and rejoicing (in
his mind), be it with
women, carriages, or
relatives, never minding
that body into which he was
born.
'Like as a horse attached to
a cart, so is the spirit
(prana, pragnatman)
attached to this body.
- 'Now where the sight has
entered into the void (the
open space, the black pupil
of the eye), there is the
person of the eye, the eye
itself is the instrument of
seeing. He who knows, let
me smell this, he is the
Self, the nose is the
instrument of smelling. He
who knows, let me say this,
he is the Self, the tongue is
the instrument of saying.
He who knows, let me hear
this, he is the Self, the ear
is the instrument of
hearing.
- 'He who knows, let me
think this, he is the Self,
the mind is his divine eye .
He, the Self, seeing these
pleasures (which to others
are hidden like a buried
treasure of gold) through
his divine eye, i. e. the
mind, rejoices.
'The Devas who are in the
world of Brahman meditate
on that Self (as taught by
Prajapati to Indra, and by
Indra to the Devas).
Therefore all worlds belong
to them, and all desires. He
who knows that Self and
understands it, obtains all
worlds and all desires.'
Thus said Prajapati, yea,
thus said Prajapati.
link:—http://www.hinduwebsite.com/sacredscripts/hinduism/upanishads/chandogya.asp
This is just my thinking you can believe in what you have got up with.