In simple terms, the fixed rates are priced off the interest rate swap curve (this prices swaps across all different maturities e.g 3yr 5 yr 10yr etc These swap rates are determined by the market and and move in in line with expectations on interest rates. These rates create the yield curve i.e rates for different maturities , ( wikpedia or google will provide countless articles on the yield curve ) The yield curve is upwardly sloping as the market has already priced in economic recovery and in time higher rates. Therefore 5 year rates are higher than 1 or 2 year rates.
Variable rate are more linked to short term rates which are set by the ECB. Though they are less linked than they used to be as funding levels are higher due to short term Euribor rates being elavated against the ECB repo rate ( sorry about being technical).
For both fixed and variable rates the banks add on margin to cover the credit risk, the level of this margin can be impacted by competition. (of which there is precious little at the moment)
So if you fix your rate today for 5 years you will fix on a forward looking i.e higher rate as the market has already priced in some recovery. In pure economic terms fixing makes sense if you expect rates to go up by more than the market currently expects.
Another benefit of fixixng is certainty, if someone's finances would be badly effect by rates rising above the current fixed rates, they could consider fixing and viewing paying the higher rate today as insurance against rates going even higher over the period of the fixxed rate. I hope this helps.