Why are metrics defined as functions in $\mathbb{R}^{+}$?

In the theory of metric spaces there are two properties of the real numbers (which are used as the values of the metric) that play an important role. The first is that $\mathbb{R}$ is Archimedean, which means that $\mathbb{N}$ is not bounded above in $\mathbb{R}$. The second is that $\mathbb{R}$ satisfies the supremum property, i.e. every nonempty set that's bounded above has a supremum.

To get a sense of how these are used in metric space theory let's first look at how they're used in real analysis.

Archimediean property: Here are just a couple of the very many things that one can prove are equivalent to the Archimedean property in any ordered field $\mathbb{F}$:

  • The sequence $\{1/n\}_{n=1}^\infty$ converges to $0$ (here convergence is w.r.t. the absolute value defined on any ordered field).
  • If $x \in \mathbb{F}$ and $-1 < x < 1$ then $x^n \to 0$ as $n \to \infty$.
  • If $x \in \mathbb{F}$ and $-1 < x < 1$ then $\sum_{n=0}^\infty x^n$ converges to $1/(1-x)$.

Supremum property: Here are a couple things equivalent to the supremum property in any ordered field $\mathbb{F}$:

  • Every bounded and monotone sequence is convergent.
  • $\mathbb{F}$ is Archimedean, and every Cauchy sequence is convergent (here Cauchy is also defined with the absolute value on $\mathbb{F}$).

Certainly all of the above bullet points are used rather frequently in proofs in real analysis. The key point here is that they are often used in metric theory proofs as well! The Archimedean examples are used all the time. To show that $x_n \to x$ in a metric space we often show that $d(x_n,x) \to 0$ in $\mathbb{R}$ by showing that it's bounded above by something of the above form, say $C /n$ or $C/2^n$. The geometric series is used in some key proofs, too: for instance, it's the main component of the proof of Banach's fixed point theorem.

The supremum property equivalences are used from time to time in proofs, but they also play an essential role in the theory of completeness. All the proofs that show that a metric space has a completion rely crucially on the fact that $\mathbb{R}$ is itself a complete metric space, which is given by one of the above bullet points. The existence of a completion is quite useful in a couple places.

So, the upshot is that we use $\mathbb{R}$ in the metric space theory because it allows us to port a bunch of tricks / results / ideas from real analysis to metric analysis. Does this mean that it's a necessary ingredient in the definition? Certainly not. For instance, in the discussion above I talk about using the absolute value on arbitrary ordered fields to define convergence. This works perfectly fine as a substitute for a metric and gives rise to a reasonable way of doing analysis. We can think of this as an "$\mathbb{F}-$metric" $d: \mathbb{F} \times \mathbb{F} \to \mathbb{F}^+$, and in principle we could also define something like this on general spaces.

If $\mathbb{F}$ is Archimedean, then $\mathbb{F} \subseteq \mathbb{R}$, and so we actually have a metric! This means we only get something "new" when $\mathbb{F}$ is non-Archimedean, but in this case all sorts of weird stuff shows up. For instance, without the Archimedean property it becomes rather tricky to prove that things converge by bounding the distance by a known sequence since $1/n$, $2^{-n}$, etc no longer converge to $0$.

I haven't thought too much about what happens if we let the metric take values in an arbitrary ordered Abelian group (I believe this is what we would get from what you say above), but I suspect the biggest issue will again occur when we leave the context of Archimedean ordered groups.


Why are metrics defined as functions in $\mathbb{R}^+$?

A: Well, actually metrics are not always defined as functions in $\mathbb{R}^+$.

As is pointed out in Glitch's answer, when the metric take values in the real numbers, we have Real Analysis at our disposal. And sometimes, that is all that is needed, for example, in classical Functional Analysis, as long as we consider Archimedean valued fields (equivalently, subfields of $\mathbb{C})$, the norms and metrics that are usually considered don't need to take values outside the real numbers to obtain great results.

But certainly, this is not the case if we allow the use of non-Archimedean valued fields with valuations of rank larger than 1 (taking values in ordered groups that cannot be embedded in $\mathbb{R}^+$). Although in this case, we cannot make use of real analysis, we use $p$-adic analysis (if we are using $p$-adic fields) or Levi-Civita analysis (if we are using the Levi-Civita field) or any other ultrametric analysis. In this context, the norms and seminorms need to take values outside the real numbers (see this definition), and here the need for metrics with values in arbitrary linearly ordered sets is evident. This generalization of matrics are called "scales" and its study has far-reaching consequences for non-Archimedean Functional Analysis.

For an introduction in this area I recommend the paper:

Banach spaces over fields with a infinite rank valuation - [H.Ochsenius A., W.H.Schikhof] - 1999

After that see: Norm Hilbert spaces over Krull valued fields - [H. Ochsenius, W.H. Schikhof] - Indagationes Mathematicae, Elsevier - 2006