It's the "in part" bit that is key (also the fact that this is legal in some countries). Where a tool has legitimate uses it tends to be legal (but may have restrictions placed upon its use - an example from the physical world is machetes) whereas when something has only illegitimate uses it tends to be made illegal (e.g. flick knives). Tor is the first category, some illegal use and some legal. An API for a proprietary service is tied to that services and can only be used to access it if this access is not allowed then why should the tool exist?
It has legal uses that I've already pointed out. First, it is legal to use by anyone with permission. Second, it serves as an example of code for others to learn from.
As for bans on knives and such, I consider such bans just as unjustified.
Tor was, in part, made for countries where that is illegal.