Why did mathematician construct extended real number systems, $\mathbb R \cup\{+\infty,-\infty\}$? I know some properties cannot be defined with the real number system such as supremum of an unbounded set. but I want to know the philosophy behind this construction (extended real number system ($\mathbb R \cup\{+\infty,-\infty\} $) and projectively extended real number system ($\mathbb R \cup\{\infty\}$)) and why did mathematician want to do so? what are the beautiful properties they achieved? I want an answer with a philosophical point of view. 
P.S. is there any books or notes or something which I can refer?

From a "philosophical point of view", one of the reasons to define the extended real numbers is because the numbers $\pm \infty$ quantify a number of numerical and geometric mathematical objects and notions and make things simpler overall. In other words, they didn't do it for the sake of philosophy, they did it for the sake of mathematics.
One of the very simplest examples is that we use them in expressing intervals; the set of positive real numbers can be expressed as $(0, +\infty)$, with $0$ and $+\infty$ being the (excluded) endpoints of the interval.
Another example is that, rather than having nearly a dozen different ad-hoc extensions of the notion of limit, things like $\lim_{x \to 0} 1/x^2 = +\infty$ are simply ordinary limits in the sense of topology rather than simply being ad-hoc formal notation. $1/x^2$ converges to $+\infty$ as $x \to 0$.
Similarly, a number of standard functions can be continuously extended to have values at $\pm \infty$, simplifying various things such as the calculation of limits. For example, we can define things like $\log(+\infty) = +\infty$ or $\arctan(+\infty) = \frac{\pi}{2}$, and these functions remain continuous.
The extended real numbers are also the simplest extension of the real line to have the full least upper bound property: every subset of the extended real line has a least upper bound in the extended real numbers.
Topologically, the extended real line is a compact topological space. Compact topological spaces are extremely nice. For example, every continuous real-valued function on the extended real line has a maximum value. (not just a supremum!) This lets you instantly prove theorems like

Theorem: Let $f$ be a continuous function $\mathbb{R} \to \mathbb{R}$ such that $\lim_{x \to \infty} f(x)$ and $\lim_{x \to -\infty} f(x)$ are real numbers. Then $f$ is bounded.

simply by removing the discontinuities at $\pm \infty$ to get a continuous function on the extended real line.

The projective real line, AFAIK, comes out of (algebraic) geometry.
The projective plane was an important advance in the field of Euclidean geometry, and the projective real numbers are simply the one-dimensional version of that.
It turns out that projective spaces play a central role in doing geometry algebraically.
