$\mathbf{R}\cup\{\infty\}$ vs $[-\infty, +\infty]$ in the Lebesgue integration theory $\def\Rbf{\mathbf{R}}$
By the Heine-Borel theorem, the real line $\mathbf{R}=(-\infty,+\infty)$ with the standard topology is not compact. 
By the Alexandroff extension, one has the one-point compactification $\Rbf\cup\{\infty\}$, which is homeomorphic to the circle $S^1$. On the other hand, the extended real line $[-\infty,\infty]$ with the order topology is compact; it is homeomorphic to the closed interval $[0,1]$.
When introducing the (abstract) Lebesgue integration theory, Rudin in his Real and Complex Analysis uses the extended real line instead of $\Rbf\cup\{\infty\}$ for the range of measurable functions.
Is it just a matter of convention or are there any deep reasons that one should use one not the other?
 A: Yes, it makes a big difference.  The key is ordering.
Lebesgue integration theory relies critically on having a good ordering on the range space of your functions, and on the space where the integral takes its values.  This can be seen in the very definition of the Lebesgue integral $\int f$ as the supremum of $\int g$ over all simple functions $g$ with $g \le f$.  The word "supremum" involves the ordering on the space where the integral takes its values, and the condition $g \le f$ involves the ordering on the range space.  You see it again in fundamental results like the monotone convergence theorem, Fatou's lemma, etc.
Now the ordering on $\mathbb{R}$ itself is pretty nice, what with the least upper bound property, but the extended reals are even nicer: in $[-\infty, \infty]$, every set has a least upper bound, every nondecreasing sequence converges, and so on.  This means we can avoid a lot of special cases when talking about functions with singularities or whose integrals are infinite.  The tradeoff is the algebra is less nice: $[-\infty, \infty]$ is no longer a field, and so we have to add some special cases for expressions like $0 \cdot \infty$ or $\infty + -\infty$.  But that's manageable.
By contrast, $\mathbb{R}$ together with an "unsigned infinity" would be totally unsuitable, as it has no good ordering at all: you don't want to say either $0 < \infty$ or $0 > \infty$, so the trichotomy axiom fails.  Then you have a problem with the definition of the integral: if you have a function $f$ that takes the value $\infty$ somewhere, you can't decide whether the simple function $g=0$ should be included in the supremum defining $\int f$.
A: $ [-\infty, \infty] \text{ and } \mathbb R\cup\{\infty\} $ are two completely different animals if you consider the topology. Now a Borel $\sigma$-algebra on a topological space is the smallest sigma algebra containing the open sets of that topological space.
So it has nothing to do with convention.
I could have used any other set as the range of a measurable function.
Recall the definition of a measurable function 

Suppose $(X,\Sigma)$ and $(X',\Sigma')$ are two measurable spaces, and suppose that the $\sigma$-algebra $\Sigma'$ is generated by the family of sets $\Pi$. Then $f : X \rightarrow X'$ is $\Sigma/\Sigma'$ measurable if (and only if, trivially) $f^{-1}(E) \in \Sigma$ for all $E \in \Pi$.

And for topological spaces we take the sigma algebras to be Borel $\sigma$-algebra.
You can talk about a measurable function from any measurable space $(X,\Sigma)$  to a topological space $Y$ by taking the Borel $\sigma$ algebra on $Y$ denoted by $\mathcal{B}(Y)$.
$\mathbb R\cup\{\infty\}$ is obtained by "identifying" $+\infty$ and $-\infty$ of
$ [-\infty, \infty] $ .(reference).
So the family of measurable functions from any measure space $(X,\Sigma)$ to $(\mathbb R\cup\{\infty\},\mathcal{B}(\mathbb R\cup\{\infty\}))$ and that to $ ([-\infty, \infty],\mathcal{B}( [-\infty, \infty]))$ are different and that is because of the difference in topology (as the $\sigma$-algebra depends on topology here).
So the difference you must have understood by now is that $ [-\infty, \infty] $
has a natural ordering which $\mathbb R\cup\{\infty\}$ doesn't. And that helps us in deriving the Lebesgue integration theory. 
