I think it's working as intended. I'll try to explain. When you have "Sprite2.number = Sprite.number" it loops through each Sprite2 and each Sprite and compares them.
In your first example it's comparing them like this:
Compare Sprite2(number 3) to Sprite(number 1)
Compare Sprite2(number 2) to Sprite(number 2)
Compare Sprite2(number 1) to Sprite(number 3)
You see it's looping through them both in different orders so only Sprite number 2 matches and it's the only one that moves. If you swap the numbers 1 and 3 on Sprite2 then they will all move.
Probably you want to compare each Sprite2 to every Sprite so you should do something like:
For each Sprite2
For each Sprite
Sprite2.number = Sprite.number