These hard hairless areas on the inner side of a horse’s front legs are callosities – thick layers of keratin, similar to the thick hard calluses on hard wearing areas of skin, such as the soles of your feet. Their common name is “horse chestnuts” (not to be confused with the Horse Chestnut tree). They are formed within the skin, and have no connection with any bones or joints. They don’t seem to have any function, but that does not mean they don’t have one. It just means we don’t know.
Chestnuts are claimed to be vestigial foot pads from when horses evolved from an animal with more toes, but there is no evidence they were ever part of a foot. Others suggest they are a vestigial scent gland. These claims are just excuses to avoid admitting no-one knows why they are there. They could provide some protection for nerves or blood vessels under the skin. It is quite possible they are just a minor growth disturbance that most domestic horses have inherited from an ancestor of domestic horses. By ancestor, we mean a horse, not another kind of animal.
Whatever their their function is, it will not be discovered by writing them off as useless. If we don’t know what something does the scientific approach is to use our God-given brains, and do some more research to find out.