It is intended as a consumer protection measure - it is only legal to offer to sell beer by the pint, half-pint, or third-pint (a rare measure, though it has become popular at real-ale festivals in recent years) because it makes it trivial to compare pricing from one establishment to the next. It is more difficult to gauge
value for money (especially when tipsy!) if you've got to look at the menu or a notice to find out how many centi-litres (or whatever) are supposed to be in a bar's beer glasses and then do mental arithmetic to compare that with the place down the road where the measures are different.
The fact that the mandated measure is pints rather than half-litres is mostly down to the fact that the laws regulating these things are very old (though the fact that there would be a "little Englander" backlash against
changing the traditional measures has no doubt put governments off revising and updating the legislation!).