The scapegoat in a family system or the IP the identified patient is often the child who tells the truth about the family dysfunction and acts it out in mostly negative ways, who points out the elephant in the room that the family is not willing to look at. It is this behaviour that makes the scapegoat the target for the family rebuke and usually the parents present this child at therapy as the "problem".
It is important to know the legend of the scapegoat, the scapegoat is an old jewish custom. Ancient tribes that experienced plagues, famine or drought often believed that god was punishing them for a sin. But they did not know who had committed the sin. So they performed an ancient ritual, a goat was bought into the centre of the tribe which allowed each member of the tribe to dump there individual sins upon the goat. the goat was driven out into the desert the hope was the goat would remove the sins from the community in order to return gods blessings.
The metaphorical scapegoat works the same way in a family system. The family then blames the family scapegoat so they can point out the black sheep in the family and proclaim they are not like them.
This serves the purpose of allowing the family to look functional to the outside world by making the scapegoat look completely to blame. The scapegoat is sacrificed for the good of the family.
The scapegoat however needs two characteristics in order to perform their function.
They must be the strongest: The scapegoat must bear the sins of the family, they have to survive alone in the "desert" without the comfort and support of the family.
They must be the most loving: The scapegoat sacrifices themselves for the benefit of the family. This process is somewhat at an unconscious level.