To begin with, I am blunt in this answer: human beings have not lost their tails since we never had one. In addition, in case of having had it and lost it, it would not make sense to talk about a why and, much less, a what for.
Its original function was to propel itself in the aquatic environment
Surprisingly for some, the tail is one of the 5 great characteristics of chordates and, consequently, vertebrates have it. Actually, it is an elongation of the posterior end of the body, and its beginning is just behind the anus.
When the vertebrae appeared, the tail (which was only an extension of the notochord, spinal cord, and musculature in the postanal region) was reinforced with the end of the vertebral column, that is, with the caudal vertebrae. Its function continued to be to propel movement in the aquatic environment, although with greater efficiency. Currently we can appreciate it in the typical undulation of a swimming shark.
The challenge of moving out of the water
The anatomical and physiological revolution that led to the conquest of the terrestrial environment also involved the tail. First of all for the most obvious: the tail no longer propels the movement, the legs do. But there is another hidden aspect much more interesting. By not having thrust counteracting the force of weight (as occurs in a dense medium such as water), gravity is a problem when we aspire not to live by dragging ourselves.
“Lifting” the body was a complex task, but evolutionary innovations adapted biological designs that leave the most competent of road, canal and port engineers speechless. In fact, a skeletal morphology very similar to the Forth bridges emerged: the trunk would be suspended between the 2 pairs of legs (the pillars), the muscles and ligaments (elastic and flexible) would counteract the tensions, and the bones (hard and rigid) would resist compression.
To support the weight it was essential to avoid flattening and adopt the curved shape. For this reason, and as in the suspended arch bridges, the arched column form was selected. But a new problem arose: our wonderful biological bridge could not be static since an animal has to move. It had to be a mobile bridge where the tail would play a key role, orienting itself towards the opposite side to which the support was made. Thus, oscillating to the left and right, overloads were avoided by acting as a counterweight.
Even more interesting was his role in the reptiles that rose to their feet. The bipedalism of dinosaurs like that of the iguanodontidOuranosaurus, biomechanically speaking, is nothing more than a child’s seesaw where the tail counteracts the weight of the front half of the body; the balance point would be hipper.
We, human beings, did not lose our tails; we never had them!
The evolutionary line that led to hominids was characterized, with respect to the axial skeleton, by 3 main transitions: loss of the tail and adaptations to orthograde (upright) posture, and bipedal locomotion.
However, these 3 big changes did not happen simultaneously. In fact, tail loss occurred in the context of pronograde (movement supported by all 4 limbs) and gorillas and chimpanzees move in this way without displaying a tail. Its loss, then, is an evolutionary phenomenon independent of the upright posture and occurred prior to the appearance of the first hominin. In other words, we humans have not lost our tails because, in our evolutionary lineage, they were lost long before we appeared as such.
On the other hand, and as Xia et al. have recently published, the tail was drastically lost. It was simply due to a mutation consisting of the insertion of an Alu element in the genome of the hominoid ancestor (Alu sequences are mobile pieces of DNA, non-coding, associated with different evolutionary processes of primates). They demonstrated this easily and simply by inserting the Alu sequence into an intron of the TBXT gene of mice and… Surprise! Little mice were born with no tails.
Finally, it should be remembered that mutations are random, that is, there is no reason. They just happen, and if they do not affect the fitness of the species, they do not get negatively selected, they do not get their heads cut off by natural selection and they move on. There is no finalism, that is, there is no why, nor is there any route to the perfection of anything pre-established. In fact, Alu insertions have been linked to several heritable diseases in humans such as hemophilia A and B, familial hypercholesterolemia, neurofibromatosis type 1 or hereditary colon cancer.
In view of all this, what a pity that we do not have a queue! To the wonderful functional applications that we have commented, we should add what it would mean to avoid these pathological risk factors dragged by the Alu sequences. Although, more than one, what he really misses is the idea of having a shiny and sensual tail, moving suggestively and bewitching whoever contemplates it; with bows, piercings or simply with a shiny furry pompom… What a powerful seduction weapon we humans have missed!