As Pipz mentioned, you must think of the different missions intended for each type of vehicle. Also, be clear whether talking about the Allies or the Germans, as the different strategic conditions and tactical doctrine influenced design and construction.
Generally though, the tank was built for both infantry support (as best exampled by the German Pz I, II, III, and early IV) and for breakthrough assault epitomized by the later PzIV, Panther and Tigers. In other words, tanks were best used as offensive weapons.
Tank destroyers were generally intended as defensive weapons that could be quickly moved to, if possible, prepared defensive positions to counter an armored threat. Though as in the case of the American M-18, they were not always used as such, but employed in more aggressive tactics than they were intended for.
And the reasoning for not using tanks exclusively in all roles was of course, the holy trinity of all human endeavor: time, cost and quantity. In particular, the Germans needed the most units it could build, for the least cost, in the shortest time.