Where does Command-Shift-3 or Command-Shift-4 (for taking screen captures) originate from?
What’s an FKEY?
FKEY’s (Function Keys) are resources containing executable code that are called upon by hitting the keys Command-Shift-# (any number 0-9) at the same time. In the standard System file there are two FKEY’s; with an ID#3 and #4 that are used to dump the current screen or window onto disk or printer.1


So far as I can remember/find, screenshot commands were first added to the OS itself in System 6.2

1 Text and image from FKEY that runs other FKEYs!   by John Holder (MacTech magazine, 1988)
2 Further reading/references: Mel's Macintosh Universe: Macintosh Plus and a forum posting from 2003, How do I take a screen shot (the latter of which features some guy named Chealion).