Within the same family and generation, I don’t think this should happen any more. But especially in the past, some laptops were configurable with processors of different generations or families (M, Q, QM, U, so many possibilities) so that the i7 option might have worse real-world performance than the i5 (due to more slower cores).
It's been a cooling problem on a lot of i9 laptops... the CPU will hit thermal peaks, then throttle down, this has an incredibly janky feel as a user... then it spins back up, and down... the performance curves just wacky in general.
Today is almost worse, as the thermal limits will be set entirely different between laptop vendors on the same chips, so you can't even have apples to apples performance expectations from different vendors.