Being entirely honest, Salah is a good player, so losing him would have been a huge loss for Liverpool; they know that, as does pretty much everyone else.
Losing him on a free next summer would be a terrible piece of business as he'd be very difficult to replace when they got no income from a sale.
It'd be even worse if he didn't give 100% for the year and then left, so they were stuck in a situation of selling him now with Mane, seeing him go next year or...
... they decide to break their wage structure. Salah and Mane have had the club by the balls and they've caved in. Some will rejoice and I actually get that.
However, I think most fans will see it as retaining a top player but at the cost of potential long-term financial consequences. A little bit of a catch-22 situation.