In $L^2(\mathbb{R})$, let
$$ I_{j,k} = [k2^{-j}, (k+1)2^{-j}) \subset \mathbb{R} \text{ for $k$,$j \in \mathbb{Z}$ } $$
and the Haar function $h_I(x)$ be defined as
$$ h_I(x) := (1/\sqrt{|I|}) (\chi_{I_r}(x) - \chi_{I_{l}}(x)) $$
where $I$ is shorthand for an interval of form $I_{j,k}$ and if $I = [a, b)$ then the notation $I_l$ and $I_r$ denotes
$$ I_l = [a, (a+b)/2) $$
$$ I_r = [(a+b)/2, b) $$
From a step from a proof in a textbook:
Question: Why is there a factor of $\frac{\sqrt{|I|}}{2}$ in this equality? It seems to me that
$$ ⟨f, h_I⟩h_{I}(x) = ∫ fh_{I} h_I (x) = \left( {1 \over |I_r|} \int_{I_r} f - {1 \over |I_l|} \int_{I_l} f \right) h_{I}(x) $$
So where does this extra factor come from?

The inner product of $f$ with $h_I$ is not as you've written. It is $$ ⟨f, h_I⟩ = ∫ fh_{I} = \int f\frac1{\sqrt{|I|}}(\chi_{I_r}-\chi_{I_l})= \frac1{\sqrt{|I|}}\int_{I_r} f - \frac1{\sqrt{|I|}} \int_{I_l} f . $$ Remember that $|I|=2|I_l|=2|I_r|$, so you can write the first coefficient $1/\sqrt{|I|}$ as $$ \frac1{\sqrt{|I|}}=\frac{\sqrt{|I|}}{|I|}=\frac{\sqrt{|I|}}{2|I_r|}$$ and the second one as $$ \frac1{\sqrt{|I|}}=\frac{\sqrt{|I|}}{|I|}=\frac{\sqrt{|I|}}{2|I_l|}$$