Old aspirin smells like vinegar because it contains acetic acid, which is the primary component of vinegar. When it ages, aspirin breaks down into its original components: salicylic acid and acetic acid.
Aspirin is made from acetic acid and salicylic acid. Acetic acid makes up most of the acid in the aspirin, and acetic acid smells like vinegar. As aspirin begins to age, moisture in the air is absorbed into the aspirin, which makes it turn back into its original components. Many types of aspirin are coated with a substance that prevents this breakdown, but aspirin exposed to the air can begin to smell like vinegar.