Bathroom pipes need to be bonded so that, in the unlikely event of a fault, when in a bathroom it is quite likely that wet skin would be in contact with metalwork, all* the metalwork is bonded together, so that there will be no voltage between, say, the shaver outlet, the radiator, the tap or the iron bath (remember that you have to touch two conductors, with a PD between them, to get a shock).
As it happens they are also bonded to the CPC (earth wire) of all the electric circuits that enter the bathroom, so they are earthed as well. And it is quite likely that there will be at least some copper pipes, which are quite likely to be bonded at some point to the main earthing point.
But it is the bonding of all* the metal bits together that protects you from shock, even if they aren't effectively earthed. Some factories have areas with bonding but no earthing, by design.
You are not now required to earth or bond kitchen things, for example, your kitchen tap.
However gas regulations require you to earth the boiler and its pipes, and you are required to earth the incoming gas and water mains, which may come up in the kitchen, so you will probably have ended up earthing the cold tap, so some older people (including me) who learned an out-of-date method feel we might as well bond the hot tap and sink as well.
* except odd, isolated things like a metal coat-hook or door handle, that aren't connected to anything else.