No one seems to agree about why exactly it turns yellow, but there’s some thought that the reaction with the aluminum causes the proteins in apocrine sweat to really stick to your clothes.
These products generally contain some version of a compound called aluminum chloride, which works by acting as a sort of gel-like plug for your apocrine sweat glands, so you don’t produce as much sweat.
You ask each other to dance - which brings you close enough to get a wiff - after all, your sebaceous and apocrine glands release scents through the armpit which potential partners may find attractive.