In service to the plot, characters are given these roles, sometimes making them just plot devices with lines.
These "devices" can also be viewed as "component parts" from which more complex, realistic characters can be built, but television production usually means churning out episodes as quickly as possible to meet looming deadlines. Mediocre writers will merely take one of the following labels and slap a name on it. By contrast, better writers start with a character and slap two or more of the following labels on it.
Contrast Characterization Tropes, where the plot serves the establishment of the character.