Maybe I'm misunderstanding but if your question is "Why does doing the same set of moves repeatedly always get the cube back to its original position?" then the answer is pretty simple.
The cube group is finite. I mean, it's really big with 43 quintillion elements but that's still finite. That means that when you keep applying your set of moves, EVENTUALLY there will be no new states left and you'll land on a state already seen.
Furthermore, we know that this state (the first state you land on that you've already seen) will be your original state. Why? In a nutshell, it's because moves are invertible. Meaning if you undo a move, you're guaranteed to go to your previous state, and not a new one.
Consider the following. Say you have your set of moves, and you start in position A. Then by applying your set of moves, we are now at B. Then applying the moves again, now we're at C, and so on:
$$
A \rightarrow B \rightarrow C \rightarrow \ldots
$$
Then eventually we'll get to the state right before we see a repeat, let's call in Z. Then Z MUST point to A. Because if it didn't, and pointed to another state (say) B, then both A and Z point to B. This is impossible, as each state can have at most one thing pointing to it. So we know the following must be the case:
$$
A \rightarrow B \rightarrow C \rightarrow \ldots \rightarrow Z \rightarrow A
$$
If your question is "Why do these particular algorithms repeat in 6, 12 moves?" then I don't have a great answer for you... just do it and see how long it takes lol!
There are some tricks though. For example take the algorithm $RU$. This repeats after 63 times. But if we do $RU$ only 7 times, we see that all the edges are back to their original spots. And if we do $RU$ two more times (so 9 in total) we see all the corners are back to their original spots. So $RU$ will repeat in $7 \times 9 = 63$ iterations.
Some other fun facts for you. The number of times you need to repeat an algorithm to get it back to the original state is called the order of the algorithm. So the order of $RU$ is 63. It turns out the maximum order of any algorithm is 1260. That means, that no matter what algorithm you pick, and you keep doing it, you'll end up at your original state in 1260 iterations or fewer.
Here is a website I found with how many algorithms have each order: https://www.jaapsch.net/puzzles/cubic3.htm#p34
It turns out that the most common order is 60, with about 10.6% of all elements of the cube group.