How do people discover cheat codes in games?

There is an interesting post on Reddit about this question. You can read and imagine many theroies on this topic, but I think the answer is really simple :

The developers leak them and they spread. No one can just figure out combinations of buttons like the ones in the old GTA's.


Most cheat codes weren't discovered by the players per say. In the early days of gaming, the biggest source of cheat codes were actually from the gaming magazines as a way of enticing people to buy them.

For example:

Example