The cost function of LS algorithm
Because when a quantity can be complex, and even when it is just real, the absolute squared difference $|f-g|^2$ can be expressed in both domain (complex and real) as:
$$|f-g|^2 = (f-g)^H(f-g)$$
and of course this is correct as well for reals. This setting is often related to Hilbert spaces.