How can Hashem set up witnesses before Yisrael have sinned?
Rashi: He set them up as witnesses that He had warned Yisrael, not to testify that they had sinned. 1
Rashbam: This was an advance warning that the Heaven and earth will come and punish them in the event that they sin. 2