Let me tell you a story:
One parent got up and called to three children:
- Ace - wake up and go bring me an apple
- Deuce - wake up and go bring me an apple
- Trey - wake up and go bring me an apple
That parent was happy to have three apples and everyone out of bed.
The other parent said:
- Trey - wake up and go bring me an apple (or they think they asked Trey - they're not really sure they were specific about what or who was asked)
Does this match what "doesn't work" for you?
If so - awesome. If not, you'll want to step through each script in Script Editor and see where your programs go "off script". I would also encourage a look at https://latenightsw.com Script Debugger - it runs some basic functionality for free, but If you value your time more than you do stepping through scripts in Apple's more basic editor, it may be worth the $$ to you for the full version.
Also, a book on iteration or loops might be a good place to go if everything wasn't clear. Don't feel bad, this is a great place to stumble and learn - once you get loops, you'll be able to do amazing things in any scripting language - not just AppleScript.