Gamers love to criticize «RNG» in games. For example, imagine a dice game in which you and your opponent both roll the dice and the highest roll wins. This is a «pure RNG».
Random number generator
Random Number Generator (RNG) is an algorithm that generates random numbers. In video games, these random numbers are used to determine random events, such as your chance of getting a critical hit or picking up a rare item.
Random number generation, or RNG, is a defining factor in many modern games. They are the reason why you always encounter unique Pokémon, why items in Mario Kart are different every time you pick them up, and why you randomly find super cool treasures (or not) in Diablo. Some procedurally generated games like Binding of Issac or Minecraft would not be possible without RNG.
Not every game depends on RNG. Rhythm games like Dance Dance Revolution or Guitar Hero are great examples. Competitive multiplayer games like Rocket League and Mortal Kombat also have little to no randomness.
This does not mean that RNG is avoided in all competitive games. Counter-Strike: Global Offensive uses RNG to determine how bullets hit targets, while DOTA 2 uses RNG to determine how often abilities will affect opponents. The gameplay has an element of randomness that makes it unpredictable.
RNG keeps games fresh (but can undermine skill)

Randomness is what keeps things from becoming the same. This is what leads to curiosity and risk taking and is one of the best tools for keeping the game fresh.
Think of blocks in Tetris. Each block in Tetris is chosen randomly. If they weren’t, then Tetris wouldn’t be fun, stressful, or unpredictable. There would be no risky or smart moves; will only right move . Tetris would be an endless memory game, like counting pi numbers.