Our primate ancestors required tails so they could effectively move around on trees. A tree dweller without a functional tail is slower and has a harder time gathering food and escaping from predators. That's a very strong selection pressure that ends up maintaining the tail.
When the woods in eastern Africa changed into savannah, we shifted to two legs and adopted a persistence hunting strategy. The tail became useless, even a liability, and mutations that resulted in reduced tails were not selected against anymore.