Why do people pick their noses?

The most common reason is that mucus has dried into hard crusts in locations within the nose, which can be uncomfortable. More rarely, people may pick both dry and semi-solid mucus which is obstructing their breathing.
This can sometimes be a nervous habit (as is chewing fingernails) rather than actual discomfort.