Putting horseshoes on horses does not hurt the horse.
Although you're driving a nail or nails through the horses hoofs they feel no pain in those hooves so the horseshoes have no ability to harm the horse.
Horses have no nerve endings in the outer section of the hoof so they cannot feel any pain when the horse shoe is put on using nails.
So that's why nails can be hammered into the horse hoof and they are not harmed.
The horse shoe helps protects the horses hoof from damage especially when jumping or running or traveling long distances.
The horse shoes are beneficial to a horse in some cases.