$ [-\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.