Over 90% of wild cheetahs live outside of protected areas, meaning they often come into conflict with people, as their environments are very large, and towns and farms are spread through the landscape.
Cheetahs are diurnal, meaning that they are awake during the day (like us!). Many other large predators are nocturnal (awake at night) or crepuscular (awake mostly at dusk and dawn), meaning that humans don't usually see them when they are most active. Therefore, when a farmer wakes up in the morning and finds one of his livestock killed, and he also happens to see a cheetah on his property, he makes the connection that the cheetah was the one to blame. In fact, it MIGHT have been the cheetah, but the culprit is usually another predator that the farmer wouldn't have seen like a lion, hyena, or leopard.
Many farmers in Africa gain their livelihood (their job!) from selling or raising livestock, so having one go missing is very detrimental to them. It means lost money, which maybe means less food on the table for their families. It is therefore understandable that sometimes the farmers take action against the cheetah, often trapping them or shooting them to make sure they don't hurt their livestock any further.