Licenses aren't just for ensuring competence (as in the case of driver's licenses). Sometimes, they're to make sure that the government knows about the people doing it (as in the case of car registrations), either to collect tax or to be able to find people associated with an activity. And sometimes they exist to limit the number of people who can do something (as in the case of liquor licenses in many areas).
In this case, it seems like SF wants to "license" rental activity in order to tax it, and it wants to tax rental activity in part to limit it. Zoning could do this, too, but a tax is more flexible on an individual basis.
This is especially meaningful in a city in the midst of an affordable housing crisis.