Why do people have nails?
The reasons people have nails is a "hotly debated topic." sources say originally they were used as tools and helped peopled climb trees and more. Today nails have become less like claws and protect the nailbed from injury. Some people use their nails to help untie knots, peel fruit, and more.
Short answer is we evolved to have nails because they help us pick things up (like food), pick things off (like bugs), and hold tightly onto things. Early humans who had these type of nails (instead of claws) tended to live long enough to have babies and pass on the fingernails gene to their kids.