It's not from the temperature, so there are a few reasons why it might be happening. Were you running on mains power? My 2015 Macbook with throttle down like this when running on battery and the battery has under 10% power left under heavy load or under 5% power under light load.