This looks like a good place to ask HN:

I've started with a solved cube, then turned 2 sides sharing an edge, alternatively (same direction) expecting the cube to get messed up but then returning to its solved state.

It never got solved! Maybe i didn't do it enough (i did it hundreds of times i think). Has anyone got an explanation?

The cyclic group generated by e.g. RU has order 105 (so 210 total turns or 105 of each side, alternated). If you have some math know-how, check out [1]. If you don't, take my word for it: when I was a teenager playing around with cubes, I once had a similar experience trying to do the same thing you did - when I went relatively quickly it never returned to the solved state, but when I was very deliberate about each turn, I got the 105 result (not by counting back then, but by rough time estimate given the figure I just looked up). Both you and I probably accidentally threw in one or more double-turns (like a U2) in there, or undercounted and gave up well before the cycle had completed (I, too, had thought I'd made "hundreds" of moves).

[1] https://faculty.etsu.edu/gardnerr/4127/algebra-club/rubik-ta... - slide 41

It should take 105 repetitions:

https://alpha.twizzle.net/explore/?alg=%28U+R%29105

Unless by "same direction" you mean "opposite direction", in which case 63 works:

https://alpha.twizzle.net/explore/?alg=%28U+R%27%2963