To answer your question: it's expected, because you're using the wrong modulus.
CodesInChaos pretty much gave you the correct answer; I'll try to explain in more detail about what's actually going on.
We can define an elliptic curve based on any finite field $GF(p^k)$; in the case of P=256, we have p=FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF (in hex), and k=1.
The points on the elliptic curve are actually solutions to a specific cubic equation within the field (plus an artificial "point at infinity"); these solutions, plus a specific point addition operator +, form a finite mathematical group.
A mathematical group is set along with an operator for which certain identies always hold, such as $(A+B)+C = A+(B+C)$, for any group members $A, B, C$.
Because of these identities, we can uniquely define point multiplication $nG$ as the point $G$ added to itself $n$ times (for example, $5G$ is defined as $G+G+G+G+G$). And, we have the property $a(bG) = b(aG) = (ab)G$, as you have observed.
Now, for any finite group, if the group has $q$ members (that is, the set that makes up the elements of the group is of size $q$), when we know that $ab \equiv c \ (\bmod\ q)$ implies that $abG = cG$, for any group member $G$.
This value $q$ is known as the order of the curve. However, $q$ is not the value $p$ we used above; instead, for the curve P-256, it is the value q=FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551 (in hex).
That is, if you compute $c = ab \bmod q$ for that value of $q$, you'll find that $abG = cG$
n
? The order of the curve? Or the modulus of the prime field? Scalars need to be reduced modulo the order. $\endgroup$