Why do the ancestors of birds still exist?
Introduction to phylogeny
Short Intro to Speciation
Let's talk about speciation. Speciation is the process by which a single lineage split into two. This happens in a number of ways (allopatric vs sympatric vs parapatric, BDM model and others). I will consider a simple case of allopatric speciation below as it is the simplest one to understand (although not necessarily the process causing most speciation events).
Following the story of a lineage through its speciation events
Think of a population at time $t=0$. Let's call this species A (for Ancestor). Imagine that an ecological change brings a barrier right in the middle of the range of this population of A. Such a barrier could be originally caused by a fire, or a river that has changed direction or a mountain range &quot;popping up&quot;. The two now isolated populations are free to diverge randomly through time. This is what we call a speciation event. Note that under this model, there is no necessary need for selection to explain speciation. Let's call the two diverging population B and C which exist at time $t=1$.
Now, imagine C goes under another speciation event and split into the populations D and E. In the same time, population B may have changed quite a bit so that we might want to call them F. Here is a diagram of the situation
  F           D ----- E     t=2
  |               |
  B ------------- C         t=1
          |
          A                 t=0

A is an ancestor of B,C,D,E and F and does not exist today. B is an ancestor of F but does not exist today. C is an ancestor to both D and E and does not exist today. Let some more time pass by and you may eventually end up with the following tree
  G ----- H       K   I ----- J t=3
      |           |       |
      F           D ----- E     t=2
      |               |
      B ------------- C         t=1
              |
              A                 t=0

At time $t=3$, only species G, H, I, K and J exist today, the other are ancestors of current species. Let's expand this tree even further.
  L ----- M   N       O       P ----- Q      t=4
      |       |       |           |
      G ----- H       K   I ----- J          t=3
          |           |       |  
          F           D ----- E              t=2
          |               |
          B ------------- C                  t=1
                  |
                  A                          t=0

You will note that lineage I went extinct at some point between $t=3$ and $t=4$.
Naming subsets of the tree
Reptilia
I am now suggesting to give a generic name for all the lineages present in the tree we drew (which we call a phylogenetic tree by the way). Let's call them Reptilia. So all the species A,B,C,D,E,F,J,I,J,K,L,M,N,O,P and Q are Reptilia.
Birds and Mammals
Now let's consider a subset of this tree. Let's consider the subset made of the species J, P and Q only. Let's call them birds. Let's also call mammals the subset composed by the species G,L and M.
Lizards (and others)
Finally let's call lizards all reptilia that are not birds, nor mammals (in reality it would be more correct to call this group lizard_crocodile_turtles_snake_amphibians_tuatura). Of course, the right tree is much bigger! By the way, you can explore the tree of life yourself on OneZoom.org.
What is a taxon
By the way, a group of species is called a taxon (plur. taxa).
Monophyletic taxa
It might be straight forward to you that there is something fundamentally different between the groups that we called mammals, birds and reptilia to the one that we called lizards. Indeed mammals, birds and reptilia are called monophyletic as they are composed of a given ancestor and all its descendants. lizard on the other way is not monophyletic. A monophyletic taxon is also called a clade. Below is a graph representing what a monophyletic taxon is. It also uses the terms polyphyletic and paraphyletic to describe different types of non-monophyletic taxa

Concept of species
You might want to learn more about the issues behind the concept of species in the post How could humans have interbred with Neanderthals if we're a different species?
Concept of taxonomic ranks
What we decide to call a class, an order or a family is also somewhat arbitrary too. For example, we generally consider the monophyletic taxon Mammalia is a class. However, there is no non-arbitrary reason for calling Mammalia a class rather than Eutheria (eutheria = placental mammal).

Online resources
I suppose the above answered a big part of your question. You will be able to read all of what I just wrote (and much more) on any good introductory course to evolutionary biology. Consider having a quick look at Understanding Evolution by UC Berkeley for example as @MattDMo suggested in the comments.
Issues in your post
There are issues in your post that cannot be addressed in a single post (another reason for you to follow a quick intro course to evolution). Below I consider your post piece by piece mainly to point to some issues

Scientists believe

Terrible statement. By belief, we often refer to a non-justified belief, that is a belief about the world that is not justified (in science, the method of justification is called &quot;the scientific method&quot;). The statement, therefore, suggests that non-justified beliefs have a place in science while they don't. By being a little lose on the semantic, one could say that scientists &quot;know&quot; or they don't know but they don't believe without good reasons to believe.

that birds are evolved from reptiles

This is misleading (and it mislead you) because by &quot;reptile&quot; you think of a lineage that currently exists. Also, the expression &quot;are evolved from&quot; sounds very wrong. The expression &quot;has evolved from&quot; would be more correct.

evolution occur so that the organism can survive in the environment by developing new characters

This is wrong both in terms of the semantic (issue of causality when saying so that) and in term of the definition of evolution. You seem to confound evolution with natural selection.

According to natural selection

Natural selection is a process, not an explanation. It is like saying &quot;according to gravity&quot;. The semantic is wrong, you should say &quot;according to the theory of gravity&quot; or &quot;according to the theory of evolution&quot; (or eventually &quot;according to the theory of natural selection&quot;).

According to natural selection, those with favourable variations will survive and those with unfavourable die

You seem to apply that statement to population-level fitness (which would be mainly wrong) rather than to fitness variance within a population.

Why do the ancestors of birds (that is, reptiles) still exist?

The ancestors of birds don't exist anymore. I hope that was made clear from the above explanations.

Why didn't they get eliminated by natural selection?

This sentence suggests that you do not really understand what natural selection is but this is a story for another time. You can learn about natural selection on Understanding Evolution by UC Berkeley.