Metric assuming the value infinity

Nothing bad happens if you allow a metric to assume the value $\infty $. In fact, only good things happen.

Nothing bad happens since you can still talk about open balls, the induced topology, uniformly continuous functions, continuous functions, Lipschitz functions etc. and the theory looks pretty much the same as it would if the metric is not allowed to assume the value $\infty $. Moreover, any metric space where infinite distance is assumed naturally breaks down as a disjoint union of metric spaces where infinity is not assumed. The construction is very easy: define an equivalence relation on the points of the space by $x\sim y$ if $d(x,y)<\infty $. The equivalence classes are called galaxies, the space breaks down as the disjoint union of galaxies and each galaxy is metric space where all distances are finite.

That good things happen if you allow infinite distance are related to certain constructions that become nicer. For instance, if you have two metric spaces $M_1,M2$ and you wish to define their disjoint union as a metric space, then the most natural thing to do is require that the distance between a point in $M_1$ and a point in $M_2$ is infinite. If you disallow infinite distances, then you have to sweat unnecessarily to make this construction work. But with infinite distances allowed, the disjoint union of metric spaces becomes the trivial notion it should be. Also, reconciling different metric spaces on the same set becomes more transparent. For instance, suppose that $d_i$ is a family of distance functions on a set $X$. Even if it does not attain infinity, their point-wise supremum might become infinite, and thus fail to be a metric space. But if you allow infinity as a possible distance, then the supremum of any family of distance functions is again a distance function.

The reason that metric spaces with infinity allowed have better closure properties under familiar operations is that the set $[0,\infty ]$ has better closure properties than $[0,\infty )$ does.