For most people, the answer is:
The real purpose of the horn is to ‘give an audible warning of your presence’. For example, not after someone has reversed off their driveway just in front of you, but before they have put you and/or other road users in danger.
Imagine it’s a cold morning and you are driving through a residential area on your way to work. What sort of things should you be looking for?
Vehicles turning out or into junctions, traffic slowing/stopping ahead and children as they might be going to school, are all correct answers. But remember I did say it was a cold morning, so you should also notice exhaust smoke and if that smoke is coming out of a driveway it is safe to assume that a vehicle might reverse out. In this situation there are a few things you should do;
It is illegal to use a horn on a moving vehicle on a restricted road, basically a road that has street lights and a 30 mph limit, between the times of 11:30 p.m. and 07:00 a.m.