https://www.onion-router.net/Sponsors.html
...states the early generations were created by Navy R&D. The purpose was protecting U.S. government assets with widespread use providing a smokescreen for them, letting them get lost in the crowd. It also took funding from Navy CHACS, which does high-assurance security. The CIA also wanted to protect foreign dissidents in their efforts to change regimes. So, it was getting funding from State Department or a CIA front last time I checked that works on stuff like that. Majority of its funding. It would probably go into legacy mode with layoffs if U.S. military and intelligence stopped using it. They'd have no need to pay the developers' salaries.
So, anyone telling you it was designed for something other than supporting U.S. military and intelligence operations is either ignorant of its history or lying to you. That said, it did evolve to help all kinds of people who have nothing to do with such operations. I always give out the "Who Uses Tor?" page for people wondering about legitimate uses for online anonymity. It's an awesome page.
https://www.torproject.org/about/torusers.html.en
EDIT to add CHACS Accomplishments since they brag on what they achieved with Tor:
Similar to the Internet.
Even so, that's just as much facilitating illegal (under local law) activities as protecting US overseas intelligence activity is, and actually overlaps substantially with protecting US overseas intelligence activity. (US intelligence assets often being dissidents, if not always overtly so.)
While it's possible that Tor's stated mission was a smokescreen, I think it's much more probable that it as created just as its creators said, as part of information assurance (i.e. allow dissidents and journalists to get information out of repressive regimes).