Substitutions, at least in the context of integration, needn't be bijective nor continuous. Consider the following theorem, and note the hypotheses.
Theorem: Let $I$ be a connected subset of $\mathbb{R}$ and $g:[a,b] \to \mathbb{R}$ a differentiable function with a Riemann integrable derivative. Let $f:I \to \mathbb{R}$ be continuous. Then
$$\int_a^b (f \circ g)g' = \int_{g(a)}^{g(b)} f \ \ \ \ \ (1)$$
Proof: Let $F$ an arbitrary antiderivative of $f$. Note $(f \circ g)(x) \cdot g(x)$ is integrable. Moreover, it is the derivative of $F \circ g$. From the fundamental theorem of calculus, it's easy to see both sides are equal to $F(g(b)) - F(g(a))$. Note that the FTC assumes merely the Riemann integrability of $f$; see Spivak ($2008$) for a proof of this.
Example 1:
$$\int_{-2}^{1} 2x\exp x^2 \ dx$$
Let $g(x) = x^2$. From $(1)$, this integral is equal to $\int_4^1 \exp t \ dt =e - \exp 4$. Note the substitution $u = x^2$ is not bijective in $[-2, 1]$.
Example 2
For this example, let $g(x) = x^2 \sin \frac 1x$ with $g(0) = 0$ and note $g'(x) = 2x \sin x^{-1} - \cos x^{-1}$ with $g'(0) = 0$. $g'$ is Riemann integrable since it is bounded and only discontinuous at a single point. We wish to evaluate
$$\int_{-1}^1 g'(x) \exp g(x) \ dx$$
From $(1)$, it's easy to see that this integral is equal to $\exp \sin 1 - \exp \sin (-1)$. This illustrates that $(1)$ can be used even when the substitution is not $C^1$.
Example 3
Consider $$\int_{-1}^{1} \exp x \ dx \ \ \ \ \ (2)$$
In this situation, we will choose the $g$. Here, the injectivity of $g$ becomes relevant, because every occurrence of $x$ in our integral, we have to write in terms of $g$.
Let $g(x) = x^2$, $\frac{dg}{dx} = 2x$. We want our integral to be of the form
$$\int_{-1}^{1} \frac{dg}{dx} f(g(x)) \ \ dx$$
This, however, is only possible if $g$ is invertible; this is because we will need an inverse for $x^2$. How can this be solved? Split the original integral into components where $g$ is bijective. So, instead, evaluate
$$\int_{-1}^0 \exp x \ dx + \int_0^1 \exp x \ dx$$
with the substitution $g = x^2$. For example,
$$\int_0^1 \exp x \ dx = \int_0^1 \exp \sqrt{x^2} \ dx = \int_0^1 2x \cdot \frac{1}{2\sqrt{x^2}}\exp \sqrt{x^2} \ dx = \int_0^1 \frac{\exp{\sqrt g}}{2 \sqrt g} \ dg$$
Note that the $\sqrt{x^2}$ would have been problematic had we not split the integral.
Of course, in this case we've only made our integral more complicated but usually this makes the integral easier to solve.
In summary: the substitution needn't be $C^1$; an integrable derivative is enough. If the original integrand is already of the form $g' \cdot f(g(x))$, the bijectivity of $g$ is irrelevant. If you're given an integral and you want to evaluate it with an arbitrary substitution, that's when the bijectivity of $g$ is relevant, and splitting the integral usually fixes the problem.