I am guessing that you are asking why we give beams and slabs contraflexure?
It is so that, under dead load, they are flat. Otherwise they might be too curved under dead load (or indeed simetimes live load) and give rise to ponding on roofs or simply an uncomfortable feeling when you live in the space.
In a continuous beam, a point of contraflexure occurs at each point where the moment changes sign, i.e. where a stress reversal occurs. Thus, the moment is zero at each point of contraflexure, so there is no flexural stress at that point.