its given that :
A quaternion is an expression of the form :
q = $a+b$i$+c$j+$d$k
Where $a,b,c,d$ $∈$ ℝ and $i,j,k$ are basic quaternions, satisfying
$i^2$ =$j^2$=$k^2$= $ijk$ = -1
It's weird that $ijk = -1$. So $(ijk)*(ijk)$ = $(-1)*(-1) = +1$, but also, $(ijk)*(ijk)$ = $i^2*j^2*k^2$ = $(-1)*(-1)*(-1) = -1$.
Is $ijk$ an operation that's not commutative with quaternions and that's why I just contradicted $ijk=-1$?
No. This is invalid. Quaternions do not commute in general. You can't just gather the $i$'s to the left, the $j$'s in the middle and the $k$'s to the right.
The point of $ijk=-1$ is to say exactly how $i,j$ and $k$ behave with respect to one another when multiplying. For instance, multiplying by $i$ from the left gives $$ iijk=-i\\ (i^2)jk=-i\\ -jk=-i\\ jk=i $$ Instead multiplying with $kj$ from the right gives $$ ijkkj=-kj\\ ij(k^2)j=-kj\\ -ijj=-kj\\ -i(j^2)=-kj\\ i=-kj\\ kj=-i $$ (Yes, the factor of $-1$ does commute with any quaternion).
So $jk=-kj(=i)$. Similarly we get $ij=-ji$ and $ik=-ki$. Correctly keeping track of this as we sort the $i$'s to the left and the $k$'s to the right will ultimately lead us to $$ (ijk)(ijk)=-i^2j^2k^2 $$ Note that all throughout I'm liberally using the fact that quaternions are associative. Which is to say, i can put parentheses wherever I want when doing multiplication. This is valid for the quaternions, but no longer if you take the next step into octonions.