In the episode "Moe Goes from Rags to Riches" the rag explains how it became a rag over the year:
1012 A.D.: Tapestry made by a peasant wife and what it showed was what the tapestry would experience over the years.
Dark Ages: Stolen by Vikings and swindled to arabics.
1200's: Part of a tent owned by a young Persian king (Nelson) this story was a parody of 1001 Arabian nights.
1400's: Rag used for torture and used by Michaelangelo.
1800's: Used to make a Confederate flag
1930's: Rag in rag soup during the depression.
1962: Used as a flag during a Mt. Everest expedition and found by a yeti and presented it to his son (Moe).