It's not possible to create a system which protects the anonymity and privacy of users with integrity, but not of criminals. The cost of a free society is that sometimes people will do bad things and get away with it.
As regards Tor, it's extremely debatable that its existence has any impact at all on the distribution of child pornography. If you don't care about hurting people, there are way more effective ways to protect your anonymity than Tor.
In addition, Tor is an incredibly useful tool for fighting corruption in countries where online privacy would otherwise be non-existent.
So on the one hand it's a tool that gives anonymity to a group that already has it. On the other hand, it's a tool that aids in reducing human rights abuses across the board, including human trafficking.