What your friend says used to make sense.
Many years ago intel's processor could not run each thread at a different frequency/speed.
For instance, my Core2Quad q6600 can run all its cores at 2.4 gigahertz or I could overclock and run all cores at 3.0 gigahertz.
This was an ok implementation, but the problem comes when you have a single or dual threaded application that doesn't use all the cores.
The unused cores still used power even if they weren't doing any work.
Eventually Intel learned how to downclock individual cores that were not in use, which saved power and decreased heat.
Within the last few years intel learned how to go a bit further and actually downclock cores not in use and overclock the cores that are in use.
This is known as Turbo Boost as mentioned on
https://en.wikipedia.org/wiki/Intel_Turbo_Boost
https://www.anandtech.com/show/10337/the-intel-broadwell-e-review-core-i7-6950x-6900k-6850k-and-6800k-tested-up-to-10-cores/2
Also has a nice review of latest version of Turbo Boost, Turbo Boost Max 3.0.
With this monumental change you are no longer limited to high end processors with low frequencies.
Had the 6 core i5-8600k ran 1 gigahertz slower than the 4 core i5-7600k then your friend would have a case.
https://ark.intel.com/products/126685/Intel-Core-i5-8600K-Processor-9M-Cache-up-to-4_30-GHz
https://ark.intel.com/products/97144/Intel-Core-i5-7600K-Processor-6M-Cache-up-to-4_20-GHz
As you can see the 8600k has a 100 megahertz higher max turbo frequency, but a 200 megahertz lower base frequency.
A lower base is not an issue as long as you have the cooling needed to sustain the boost, which most coolers, even air, are able to do.
In a worst case scenario all cores at 100%, a 200 megahertz difference (about 5% difference) is made up by the addition of 2 cores (50% more cores).