Here's why:
* "Team" is a collective noun. Collective nouns refer to a group of people or things.
* When a collective noun is used to describe a group acting as a unit, it is treated as plural.
* "Were" is the plural form of the verb "to be."
Therefore, the sentence should be: "A team of girls were playing soccer."