Why $\sqrt{-1 \times -1} \neq \sqrt{-1}^2$? We know $$i^2=-1 $$then why does this happen?
$$
i^2 = \sqrt{-1}\times\sqrt{-1}
$$
$$
=\sqrt{-1\times-1}
$$
$$
=\sqrt{1}
$$
$$
= 1
$$
EDIT: I see this has been dealt with before but at least with this answer I'm not making the fundamental mistake of assuming an incorrect definition of $i^2$.

Any non zero number has two distinct square roots. There's an algebraic statement which is always true : "a square root of $a$ times a square root of of $b$ equals a square root of $ab$", but this does not tell you which square root of $ab$ you get.
Now if $a$ and $b$ are positive, then the positive square root of $a$ (denoted $\sqrt{a}$) times the positive square root of $b$ (denoted $\sqrt{b}$) is a positive number. Thus, it's the positive square root of $ab$  (denoted $\sqrt{ab}$). Which yields
$$\forall a,b \ge 0, \ \sqrt{a} \sqrt{b} = \sqrt{ab}$$
In your calculation, because $i$ is a square root of $-1$, then $i^2$ is indeed a square root of $1$, but not the positive one.
