While salt was used to preserve meat, the idea that the huge historical demand for spices was to cover up the taste of spoiled meat is a myth.
https://culinarylore.com/food-history:spices-used-to-cover-t...
https://historymyths.wordpress.com/2014/10/25/revisited-myth...
https://www.reddit.com/r/AskHistorians/comments/vztzpd/where...
etc