I wonder why people were buying the 3700X at 329$ when the cheaper Core i5 10600K was faster
Because the 3700x could outperform the 10600K in well multi-threaded tasks.
But the 5600x outperforms the 10700 in lightly threaded and well multi-threaded tasks. Hence the confusion as why one would spend more money on the 10700 just to get less performance.