The choice of hardness required by the user of the pencil is determined by the type of writing or drawing work, the paper surface and the "heaviness" of hand of the user.
The surface of the paper acts like a rasp, shaving off extremely fine particles of the lead as it writes. The rougher the paper, the more lead particles are worn off. In general, therefore, rough or hard paper requires a harder quality of lead and smooth or soft paper a softer quality lead.
A heavy hand might prefer softer leads and a light hand may work well with relatively hard lead qualities.