They don't know anything. There's a lot of uncertainty and volatility in the world right now.
Fixes are based on market pricing. An energy company makes a deal to buy energy at a certain price and then sells it to consumers at a price that works for them. You sign up to pay that amount.
If you want to break your contract and pay them less by moving to a cheaper deal, they need you to pay a penalty otherwise they don't make a profit - the margin on domestic energy sales is tiny, a few tens of pounds per account so they simply cannot afford to have people chopping and changing, which also costs them more admin and another reason they want people on fixes, less admin, cheaper for them.
Wholesale prices are currently the highest they've been since the start of the war in Ukraine. Which is why it looks expensive to fix for the longer term.
But no-one knows whether that's currently the cheapest choice. Prices may continue to rise and you will have lucked out. But they also might fall, you need to decide what you value, certainty but acknowledge that it might not always be cheapest (this is also the same for mortgages) or take a risk but know the price will change regularly.
Due to how the price cap is set, it's currently known that it will rise, likely over 20% in January, and possibly stay high over spring and summer but that is less certain. Which is why fixing at the current price cap is probably a good deal. But 2 years is risky, you could fix for a year instead?