This happens because red cabbage contains a pigment called anthocyanin. Anthocyanin is a natural pH indicator, meaning its color changes depending on the acidity of the solution it's in. When you add lemon juice (which is acidic), the anthocyanin molecules change their structure, causing the cabbage to turn a vibrant red.