It depends on the game. Devs use a lot of 'cheats' to test the game out and stress it at the exact point they need to, to see if it works. Gamers can also use cheats to test out the game. Take a game such as Mount and Blade: Warband for example. You need to have a plan in that game. You need to figure out your build, and what items you want by the end-game. Using cheats allows you to figure out that end character, testing out particular weapons and armours, get a full party immediately to test its strength and figure out how much income you'll need to support it, et cetera.
In Crusader Kings II, console commands allow a new player to learn this complex game far more quickly. You're able to test out mechanics and optimise your strategy. You can figure out which counties you'll need to hold, what sort of retinue will curbstomp best, et cetera.
Cheats are good for testing. They're good if you want to figure out a plan that'll take you, when gaming legitly, to something OP.