Simply put, the only operation on windows is “bring a window to the front”.
Your example would work fine. If you start with windows 1,2,3,4, you’d end up with windows 2,3,4,1 (ie 2 becomes the front window). There is no confusion about what happens. But Apple does not support this.
So the index is read/write, but the only allowable write is “1”.