I guess it matters for single core performance bottlenecks. I.e. let's say you are compiling. Higher frequency CPU will manage it in less time. More cores naturally help as well.
Most compilers should be able to handle multi-threaded compiling. I would rather go for more cores than higher frequencies
Sure, but higher frequency would speed it up on each core, right? The benefits aren't mutually exclusive.