So a potential employer can verify your current salary through the government?That's not strictly true, but in the UK employers are normally required to deduct the main income taxes before paying the employee's salary and they are responsible for remitting those taxes to the government. To do this, they need to know how much total salary a new starter has earned so far in the current tax year, in order to make the correct determinations about tax rates and therefore deduct the correct withholdings before paying salary.
So, when you leave an employment mid-year you get an official record of how much you've been paid so far that year in that employment, along with how much was deducted for taxes etc. A new employer will normally want to see these records for any previous employment within the same tax year.
That doesn't mean they can actually see your previous salary. If you started on 6 April (edit: This is the first day of the new tax year in the UK) and therefore hadn't had any previous employment in the same tax year, or if you had previously worked multiple jobs, or had a pay rise, or anything else irregular, then they can't do the arithmetic to reverse engineer the salary from what they've been told for tax calculation purposes. But if you've had one regular job since the start of the year and no significant changes in salary or bonuses, this does mean a quick division will tell them exactly what you were on before.