Why are pediatra, taxista, turista, policía, etc. used to describe both males and females? It makes less sense when you realize that up to the 1960s, all of these professions were mostly male.
Pediatra, taxista, turista and policía are not feminine but common gender: they are invariable and can function either as masculine or feminine; this will be manifest by the form of the articles, adjectives, etc. that agree with them. What you surely meant to ask was why those words have the ending -a which commonly marks feminine gender. In fact it has nothing to do with it.
- pediatra has the ending -atra which is common to medical specialists and which comes from the same root as -atría (as in pediatría): the Greek word iatrós "physician".
- taxista, likewise, has the suffix -ista which designates occupations as well as political, ideological or esthetic leanings (comunista, reformista, etc.). This suffix comes from Latin -ista and this in turn from Greek. In Latin there were three genders, not two, and final -a did not always mark the feminine gender.
- turista employs the same suffix as taxista (it is actually a calque from English tourist).
- policía meaning "police" is indeed feminine, as was the Latin word politīa, but if the meaning is "police agent" (un policía hombre, una policía mujer) it is, like the other examples, an epicene noun. The (feminine) name for the institution came first, and then the name of the agent was derived from it by synecdoche.