But you can't really take a grinder and shave off two cores if they're faulty. Prior to coffee lake i5 was probably a lower binned i7, but not now, they're different dies.
Chip manufacturers have shipped units with defective core disabled for decades... this is most common with GPUs. For instance, a RTX2060 is actually a “broken” 2070. As far as I know, there are three physical CPU dies in Coffee Lake: with 4,6,8 cores. They all come with full 12mb cache and 24eu GPU, but parts are disabled on user-shipped configs.
Fir example, a 6-core die shipped as 4-core config: https://en.wikichip.org/wiki/intel/core_i3/i3-8300