I’ve always thought that the production firms for the shows get tax breaks with clauses, or some other sneaky such nonsense, or the studio execs muck with the script to amplify the potential audience.
I don’t know many many many scriptwriters who’d happily include mental mismanagement in their script. If you sit and look at life, and think about it a fair bit, and do some reading, it’s a little hard to conclude that everyone just needs fucking over.