Question about Resistor in Project Books: Project 1 & 2

Hi everyone.

Let me first excuse myself for my bad english grammar.

I'm currently learning Arduino with the Starter Kit Uno R3.
I'm trying to really take the time to understand each exercise and the logic of how things works together before jumping to the next exercise. At the moment, I've finished exercise 1 and 2 from the book, it's a fantastic learning ressource by the way!

So, my question is: (I will try to be as clear as possible even if I'm not perfectly familiar with the correct terms to use yet)

In the exercise 1, we are using a Resistor 220 Ohms between the "Power source +" of the breadboard and the LED to prevent it to receive too much power and burn.

In the exercie a little further, we can see the same "pattern"

What I dont understand is in the exercise 2 here:

Why is the resistor "After" the LED and not "Before" to prevent it to receive too much power and burn ?
Is it because the arduino "knows" it's a LED and know exactly how much power to send on this PIN, but why would we put a resistor after ?
When we design a circuit with the arduino, is the goal to kill any power left who would go back into the ground and that's why we put a resistor right before the ground on the board? To avoid remaining power to jump back into another part of the circuit?

Thank you very much for your help, I hope I've been clear enough
I wish you a good day!
Evan

Hi!

Here is your answer.

Good luck!