Similarly PC games with mod support often have to disable Achievement systems as soon as any mod is installed just in case the mod happens to offer cheats. Which also seems to have impacted mod culture to some extent with entire classes of gamers not installing mods ever to make sure that they still win Achievements.
It's an interesting social dynamic and I think one of the clearest lines in the sand for when cheat codes disappeared, especially in genres like the FPS where "God Mode" and "noclip" codes were genre staples until Achievements. (Because DOOM offered them, every FPS offered them. Until they stopped.)
The main reason cheats have disappeared from mainstream games is because many of them prefer to sell them to you as micro-transactions, item pack DLCs, etc.
But most "triple A" games don't just release under Steam's weaker terms, they also want Xbox and PlayStation certification, which have been strongly enforced.
2. Cheats don't make sense in the age of abundance of games. Previously you'd have 3 games on your PC and you'd try to extract as much fun out of them as possible, so you'd just dick around and do silly stuff, and cheats were helpful in that. Now most gamers literally have a backlog of games, there's no time for that style of gameplay. You're done with the campaign, next game.
3. "Fun" has always been a liability, it's just that previously companies saw that as cost of doing business while nowadays all risks need to be avoided. Doing borderline illegal marketing campaigns was actually normal for many companies. When Burnout 2 was being released in 2002, Acclaim wanted to reimburse speeding tickets in the UK. Think about it for a second.
4. Children playing a literal gang member simulator with all types of violent crimes built in? Business as usual. Penis into vagina? That's a step too far you monster! I never really understood this moral panic about sex. In Europe GTA games are labeled 18+ so Hot Coffee scandal was contained to last pages of video game magazines.