Aschen nailed it: Stainless steel parts rubbing together under high pressure scrape the protective oxide layer off and then the ductile metal under the oxide layer welds itself together. Dissimilar metals (like the copper nut suggestion above) help prevent galling. I've used Nitronic 60 nuts on 18-8 and 316/316L fasteners to prevent galling when alloy steel or copper wasn't an option.
https://www.nickel-systems.com/materials/nitronic-60/