I don't understand the concept of residuals. You were paid to write the thing, so you wrote the thing, and you got the money for writing the thing. WTF. I DON'T GET PAID EVERY TIME SOMEBODY USES THE WEBSITE I WORKED ON FOR MY EMPLOYER, WHY IS CONTENT GENERATION ANY DIFFERENT!?!?!
You are treating a written product the same as a commodity. The success of a creative work isn't assured and fixed like a commodity is, basically working like fiat. So a piece of writing can either make very little money or a bunch. The initial cost of creating a show would be so much higher if writers were paid based on what the script is "worth", since there is no real metric for show success and writers would probably just charge up the wazoo to be able to survive long enough till their next gig. This would probably also decrease creative quality, and you'd probably have shittier shows because of this.
Your work (and mine) could be done in almost the exact same manner by anyone with the same education and training. The work of artists is very specific to the individual. Not that no one else could do it, but if someone else did it, it would be a different product.
I think it has something to do with the nature of creative work. If we didn't have some system in place to compensate creatives over time then people in creative jobs couldn't afford to live between employment opportunities.