When entities are killed, their score information stored under their UUID is removed from the scoreboard file. Thus, one would think that they are also removed from whatever team they are on.
Actually, they are not. When killed and on a team, the entity's UUID is still present in the list of team members. This can lead to undesirable effects, such as an enormous scoreboard file. In tandem with MC-92264, it is quite problematic, as there are many cases when teams must hold players and entities, and cannot simply be emptied.