Fresh sweat does not actually smell bad. Here is where foot stink really comes from and why shoes make it worse.
Where does the smell come from?
Your feet are packed with sweat glands, more per inch than most of your skin. Tiny bacteria live on your skin and they feed on that sweat. As they eat, they release gases and chemicals that smell sour or cheesy.
Why do shoes make it worse?
Shoes and socks trap sweat so it cannot dry out. Bacteria love warm, damp places, so they multiply quickly. More bacteria means more smelly chemicals. Washing, drying well, and changing socks every day keeps bacteria down.
Your foot sweat glands react strongly to feelings, so stress can make feet sweatier.