Because Terraria and Watch Dogs are vastly different games, in the ways that they are created and run.
Terraria requires that
all world info be loaded into RAM at
all times (on all platforms). I haven't played Watch Dogs myself, but I'm fairly sure that like most games of its type, it loads a small part at a time, and there are loading screens/pauses as you move around. Terraria has no loading screens by design and necessity.
As Terraria has grown (in terms of number of items/features and size of the code base), the amount of RAM required to run smoothly (without crashes, stutters and lags) has grown. The game has gotten large enough that the RAM available on the PS3 (and Vita, Xbox 360, and Wii U as well) is not sufficient to run the game any longer (with more content past 1.2.4). There's only so much optimization that can be done to make it fit, and optimization itself may unintentionally cause bugs and crashing issues that are much harder to diagnose and fix.
This chart show the crucial difference that is at the heart of the issue (even though it's from 2013, the specs are still accurate today):
View attachment 152392
The RAM specs are highlighted, and shows that the PS4 has 16X the amount of RAM as your PS3. Most current mobile phones and tablets have more RAM than your PS3. There's nothing you, Re-Logic, Engine, or PipeWorks can do to change that about your 10+ year-old model console.
There's only so much code and data that you can cram into 512MB of RAM and have it run predictably without major issues. That's the reason why 'last-gen' consoles and mobile devices of that level are not getting further content updates from this game. It's not the processor, the graphics chip, or the HDD. It's the RAM.