The motivation for granting such independence is to insulate the central bank from political interference, especially interference motivated by the pressure of elections to deliver short-term gains irrespective of longerterm costs.
The purpose of this insulation is not to allow the central bank to pursue whatever policy it prefers – indeed, as I just noted, governments invariably define the broad goals for the central bank – but instead to provide a credible commitment of the government, through its central bank, to achieve those goals, especially price stability.